WO2021212873A1 - Procédé et appareil de détection de défauts pour quatre coins d'un certificat, et dispositif et support de stockage - Google Patents

Procédé et appareil de détection de défauts pour quatre coins d'un certificat, et dispositif et support de stockage Download PDF

Info

Publication number
WO2021212873A1
WO2021212873A1 PCT/CN2020/135850 CN2020135850W WO2021212873A1 WO 2021212873 A1 WO2021212873 A1 WO 2021212873A1 CN 2020135850 W CN2020135850 W CN 2020135850W WO 2021212873 A1 WO2021212873 A1 WO 2021212873A1
Authority
WO
WIPO (PCT)
Prior art keywords
certificate
standard
target
picture
document
Prior art date
Application number
PCT/CN2020/135850
Other languages
English (en)
Chinese (zh)
Inventor
黄泽浩
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021212873A1 publication Critical patent/WO2021212873A1/fr

Links

Images

Classifications

    • 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/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • 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

Definitions

  • This application relates to the field of detection technology, and in particular to a method, device, equipment, and storage medium for detecting the four corners of a certificate.
  • the inventor realizes that other objects may be mistakenly collected during the collection process of the ID image, such as the background of the environment where the ID is located when the photo is taken. As a result, it causes interference in the detection of the entire ID image, which makes the detection exist. Large errors lead to inaccurate detection results.
  • the embodiment of the present application provides a method for detecting defects in the four corners of a document.
  • the method for detecting defects in the four corners of a document includes the following steps:
  • This application also provides a device for detecting defects in four corners of a document, the device for detecting defects in four corners of a document includes:
  • the obtaining module is used to obtain, when a picture containing a certificate is received, the coordinate of the feature point of the face in the certificate contained in the picture, obtain the coordinate clustering center and the minimum bounding rectangle based on the coordinate of the feature point, and obtain the minimum The area of the circumscribing rectangle;
  • a calculation module configured to calculate the rectangular boundary of the certificate in the picture based on the area of the smallest bounding rectangle and the coordinate clustering center;
  • the extraction module is used to extract the rectangular area formed by the rectangular boundary of the certificate in the picture, and to detect whether there are missing corners in the four corners of the rectangular area, and if there are missing corners, determine whether there are missing corners in the received picture.
  • the certificate is incomplete.
  • the application also provides a four-corner defect detection device for a document.
  • the four-corner defect detection device includes a memory, a processor, and a four-corner defect detection program that is stored on the memory and can run on the processor. When the detection program is executed by the processor, the following steps are implemented:
  • the present application also provides a storage medium on which a four-corner defect detection program is stored, and the four-corner defect detection program is executed by a processor to implement the following steps:
  • FIG. 1 is a schematic diagram of the structure of a detection device for four corners of a credential defect in a hardware operating environment involved in a solution of an embodiment of the application;
  • FIG. 2 is a schematic flowchart of a first embodiment of a method for detecting four corners of a credential incompleteness of the application
  • FIG. 3 is a schematic diagram of functional modules of a preferred embodiment of a device for detecting defects at four corners of a document in this application.
  • FIG. 1 is a schematic diagram of the structure of the four corners of the credential defect detection device of the hardware operating environment involved in the solution of the embodiment of the present application.
  • the four-corner defect detection device of the examples of this application can be a PC, or a portable terminal device such as a tablet computer and a portable computer.
  • the device for detecting defects in the four corners of the document may include a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002.
  • the communication bus 1002 is used to implement connection and communication between these components.
  • the user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.
  • the network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
  • the memory 1005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as a magnetic disk memory.
  • the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
  • FIG. 1 does not constitute a limitation on the four-corner defect detection device of the document, and may include more or less components than shown in the figure, or a combination of certain components, Or different component arrangements.
  • the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a detection program.
  • the network interface 1004 is mainly used to connect to the back-end server and communicate with the back-end server;
  • the user interface 1003 is mainly used to connect to the client (user side) and communicate with the client;
  • the processor 1001 can be used to call the detection program stored in the memory 1005 and perform the following operations:
  • the step of calculating the rectangular boundary of the certificate in the picture based on the area of the smallest bounding rectangle and the coordinate clustering center includes:
  • Identify the type of the certificate in the picture determine the target standard certificate corresponding to the type according to the type of the certificate, and obtain the target standard area of the target circumscribed rectangle in the target standard certificate;
  • the length and width of the certificate are calculated, wherein the proportional relationship includes the difference between the target standard length of the target standard certificate and the target standard area The first target proportional relationship between the two, and the second target proportional relationship between the target standard width of the target standard certificate and the target standard area;
  • the relative position relationship includes the target standard of the target standard certificate
  • the step of determining the rectangular boundary of the document based on the relative position relationship of the target standard document, the length and width of the document, and the coordinate clustering center includes:
  • the length boundary of the document is determined based on the length of the document and the direction of the length boundary
  • the width boundary of the document is determined based on the width of the document and the direction of the width boundary.
  • the width boundary determines the rectangular boundary of the document.
  • the processor 1001 may be used to call the detection program stored in the memory 1005 and perform the following operations:
  • the rectangular area is divided according to the first preset segmentation method Is a plurality of sub-pictures, and the sub-pictures corresponding to the four corners of the rectangular area among the plurality of sub-pictures are used as target sub-pictures to detect whether there are defects in the four corners of the rectangular area based on each of the target sub-pictures.
  • the rectangular area is divided into multiple segments according to the second preset segmentation method. And use multiple sub-pictures as target sub-pictures to detect whether there are missing corners in the four corners of the rectangular area based on each of the target sub-pictures.
  • the step of detecting whether there are missing corners in the four corners of the rectangular area, and if there are missing corners, determining that the certificate in the received picture is a broken certificate includes:
  • the target sub-pictures all contain a complete ID corner, it is determined that the received picture is valid
  • the certificate in the received picture is a broken certificate
  • the received picture is determined to be invalid, and a re-collection prompt message is output.
  • the feature point coordinates of the face in the credential included in the picture are obtained, the coordinate clustering center and the smallest bounding rectangle are obtained based on the feature point coordinates, and the smallest bounding rectangle is obtained.
  • the steps to circumscribe the area of the rectangle include:
  • the processor 1001 may be used to call the detection stored in the memory 1005 Program and do the following:
  • a first relative positional relationship between the standard cluster center and the standard length is generated, and based on the standard width and the standard cluster center, the standard cluster is generated The second relative positional relationship between the class center and the standard width.
  • the first embodiment of the present application provides a schematic flowchart of a method for detecting the four corners of a credential defect.
  • the method for detecting defects in the four corners of the document includes the following steps:
  • Step S10 when a picture containing a certificate is received, the feature point coordinates of the face in the certificate contained in the picture are obtained, the coordinate clustering center and the minimum circumscribed rectangle are obtained based on the characteristic point coordinates, and the minimum circumscribed rectangle is obtained Area
  • the method for detecting incomplete four corners of a document in this embodiment is applied to a server, where the server is in communication connection with a computer, a tablet, a smart phone, and other terminals.
  • the server is provided with an identification program and a preset neural network, and the identification program at least includes identification technology with a document
  • a program based on OCR recognition and a program based on face recognition technology such as feature point recognition are used for document recognition and face recognition, respectively.
  • document recognition can identify various types of documents.
  • the types of documents can be ID cards, driving licenses, marriage certificates, etc.
  • Face recognition can identify facial feature points and extract the coordinates of the feature points.
  • the feature points are based on the nose, Face features such as mouth, eyes, ears, etc. are generated.
  • the preset neural network is used to detect facial feature points.
  • the neural network can be dlib or face recognize.
  • a user when a user conducts online remote account opening or identification of a certificate due to certain circumstances, he needs to take a picture containing his certificate and upload the captured picture to the terminal. Understandably, if the user uses a smart phone to take a picture, then The pictures can be uploaded directly to the server. Further, when the terminal receives the picture containing the certificate uploaded by the user, it transmits the picture to the server, so that the server can recognize the face in the picture through the recognition program and extract the coordinates of the facial feature points in the certificate. Further, the server clusters the extracted coordinates of each feature point to obtain a coordinate clustering center that characterizes the center position of each feature point of the face.
  • the server determines the smallest enclosing rectangle that includes all the feature points of the face in the picture according to the coordinates of each feature point, and further detects the length and width of the smallest enclosing rectangle to calculate the area of the smallest enclosing rectangle based on the length and width.
  • the characteristic point coordinates of the face in the certificate contained in the picture are obtained, the coordinate clustering center and the minimum circumscribed rectangle are obtained based on the characteristic point coordinates, and the minimum circumscribed rectangle is obtained.
  • Step S11 when a picture containing a document is received, extract multiple feature points of the face in the document through a preset neural network, and obtain feature point coordinates of the multiple feature points;
  • the terminal receives the image uploaded by the user that contains the certificate
  • the image is sent to the server
  • the server uses the edge line detection function of opencv (Open Source Computer Vision Library) to check the tilt in the image of the verification piece.
  • opencv Open Source Computer Vision Library
  • the degree of perspective transformation is further used.
  • the server transmits the corrected picture to the preset neural network, and through the detection of the preset neural network, recognizes the face with the most feature points in the picture, extracts multiple feature points from the face, and obtains each feature The characteristic point coordinates of the point.
  • Step S12 clustering the coordinates of each feature point of the face in the document by a preset algorithm to obtain the center coordinates of the coordinates of each feature point of the face in the document as the coordinate clustering center;
  • the server clusters the coordinates of each feature point by using a preset algorithm.
  • the knn clustering algorithm is used to calculate the center coordinates of the coordinates of each feature point through the knn clustering algorithm, which is used to characterize the location of each feature point.
  • the cluster center of the center point of the area For example, the server recognizes the coordinates of facial feature points such as eyes, nose, mouth, ears, etc. through a recognition program, and calculates the center coordinates of the coordinates of the above multiple facial feature points through a clustering algorithm, and uses the center coordinates as the coordinate clustering center .
  • Step S13 Determine a minimum circumscribed rectangle according to the position of each of the feature point coordinates of the face in the document, and detect the length and width of the minimum circumscribed rectangle, and calculate the minimum circumscribed rectangle by the length and width of the minimum circumscribed rectangle. State the area of the smallest enclosing rectangle.
  • the server determines the smallest enclosing rectangle that represents the feature points of all human faces according to the position of the coordinates of each feature point in the face, and detects the length and width of the smallest enclosing rectangle, which is obtained by combining the length and width with the rectangular area calculation formula
  • the area of the smallest enclosing rectangle For example, the server obtains the location of facial features such as eyes, mouth, ears, nose, etc., and uses a smallest circumscribed rectangle to include all the acquired facial features, and measures the length and width of the smallest circumscribed rectangle. Then calculate the area of the smallest enclosing rectangle according to the rectangle area formula.
  • Step S20 Based on the area of the smallest bounding rectangle and the coordinate clustering center, the rectangular boundary of the certificate in the picture is calculated;
  • the server pre-identifies various types of standard certificates, obtains the length, width, area, and other size data of each type of standard certificate, and stores the standard certificate type and the size data of the standard certificate.
  • the standard certificates are produced according to national standards. Such as ID card, marriage certificate, driver's license and other types of documents.
  • the server recognizes the certificate in the received picture through the recognition program, and searches for the standard certificate corresponding to the certificate type in the picture from the stored standard certificates of various types, and determines the standard certificate corresponding to the certificate type in the picture as the target Standard documents.
  • the coordinate clustering center obtained by the above calculation and the area of the smallest circumscribed rectangle in the picture are combined with the proportional relationship, relative position relationship and the target standard area of the target circumscribed rectangle in the target standard certificate, and then the target standard area of the target circumscribed rectangle The rectangular border formed in the picture.
  • Step S30 Extract the rectangular area formed by the rectangular boundary of the certificate in the picture, and detect whether there are missing corners in the four corners of the rectangular area, and if there are missing corners, it is determined that the received certificate in the picture is Incomplete documents.
  • this embodiment is provided with an adjustment mechanism; an adjustment value a for adjustment is preset, and the adjustment value a is preferably 30 based on experience.
  • the x1, x2, y1, and y2 of the composition coordinates (x1, y1), (x1, y2), (x2, y2), (x2, y1) they can be adjusted by the following formula: x1-(x2-x1)/ a, x2+(x2-x1)/a, y1-(y2-y1)/a, y2+(y2-y1)/a.
  • the coordinate values of the vertices of the four corners of the rectangle are extracted, and the coordinates of the vertices of the four corners of the extracted rectangle are connected by a preset method, to obtain a rectangular area that characterizes the location of the document. Further, the rectangular area is segmented according to the first preset segmentation method or the second preset segmentation method according to different definitions, and multiple target sub-pictures are generated, and the target sub-images corresponding to the four corner areas of the rectangular area are detected.
  • the ID in the received image is determined to be a broken ID, and the invalid ID information is output and the user is prompted to take a new photo containing the ID picture of. It is understandable that the certificate in the received picture is incomplete, which may be due to the incompleteness of the certificate itself, or it may be due to the fact that the certificate was blocked by the customer when the picture was taken. Further, if it is detected that there are no missing corners in all target sub-pictures, it is determined that the credentials in the received pictures are valid, and the business is processed according to the user's request.
  • the feature point coordinates of the face in the credential contained in the picture are obtained, and the coordinate clustering center and the smallest bounding rectangle are obtained based on the feature point coordinates, And obtain the area of the smallest bounding rectangle; based on the area of the smallest bounding rectangle and the coordinate clustering center, calculate the rectangular boundary of the certificate in the picture; extract the rectangle of the certificate in the picture A rectangular area formed by the boundary, and detecting whether there are missing corners in the four corners of the rectangular area, and if there are missing corners, it is determined that the certificate in the received picture is a broken certificate.
  • a second embodiment of the four-corner defect detection method of the present application is proposed.
  • clustering is based on the area of the smallest bounding rectangle and the coordinate In the center, the step of calculating the rectangular boundary of the certificate in the picture includes:
  • Step S21 Identify the type of the certificate in the picture, determine the target standard certificate corresponding to the type according to the type of the certificate, and obtain the target standard area of the target circumscribed rectangle in the target standard certificate;
  • the server recognizes the type of the certificate in the picture through the recognition program. For example, if it recognizes that the type of the certificate is an ID card, it determines that the target standard certificate corresponding to the type of the certificate in the picture is an ID card, and obtains that the standard ID card contains all faces. The target standard area of the target circumscribed rectangle of the feature point.
  • Step S22 Calculate the length and width of the document based on the proportional relationship of the target standard document and the area of the minimum circumscribed rectangle, wherein the proportional relationship includes the target standard length of the target standard document and the target A first target proportional relationship between standard areas, and a second target proportional relationship between the target standard width of the target standard certificate and the target standard area;
  • the length of the certificate in the picture is calculated, and the target standard width and target standard width of the target standard certificate are calculated.
  • the second target ratio relationship between the standard areas, combined with the minimum circumscribed rectangle area calculates the width of the document in the picture.
  • the first target proportional relationship in the target standard document proportional relationship is a1, and the minimum circumscribed rectangle area is m, then the length of the document in the picture can be obtained as a1*m, and the second target proportional relationship is a2, and the smallest circumscribed rectangle area is m, the width of the certificate in the picture can be obtained as a2*m, and the corresponding length of the certificate is determined as a1*m, and the width of the rectangular area is a2*m.
  • Step S23 Determine the rectangular boundary of the document based on the relative position relationship of the target standard document, the length and width of the document, and the coordinate clustering center, wherein the relative position relationship includes the target standard document The first target relative position relationship between the target standard length of the target standard certificate and the target cluster center of the target standard certificate, and the first target standard width between the target standard width of the target standard certificate and the target cluster center of the target standard certificate 2. The relative position of the target.
  • the step of determining the rectangular boundary of the document includes:
  • Step S231 Determine the length boundary direction of the document in the picture based on the relative positional relationship between the coordinate clustering center and the first target;
  • the first target relative position relationship between the target standard length of the target standard certificate and the target cluster center is obtained, and the coordinate cluster center is taken as the center, and the target cluster center and the target are characterized by the relative position relationship of the first target.
  • the distance relationship between the standard lengths that is, the distance from the target cluster center to the length direction of the target standard length, determines the distance extending in the length direction perpendicular to the minimum bounding rectangle, and the end point is determined by the extended distance. Further, extending from the end point to the length direction parallel to the minimum circumscribed rectangle, the length boundary direction of the rectangle is obtained.
  • Step S232 Determine the width boundary direction of the document in the picture based on the relative positional relationship between the coordinate clustering center and the second target;
  • the relative position relationship of the second target between the target standard width of the target standard certificate and the target cluster center is obtained, and the coordinate cluster center is taken as the center, and the target cluster center and the target are characterized by the relative position relationship of the second target.
  • the distance relationship between the standard widths that is, the distance from the target cluster center to the width direction where the target standard width is located, determines the distance extending in the width direction perpendicular to the minimum bounding rectangle, and the end point is determined by the extended distance. Further, extending from the end point to the width direction parallel to the minimum circumscribed rectangle, the width boundary direction of the rectangle is obtained.
  • Step S233 Determine the length boundary of the document based on the length of the document and the direction of the length boundary, and determine the width boundary of the document based on the width of the document and the direction of the width boundary, and determine the width boundary of the document based on the length of the document. And the width boundary determine the rectangular boundary of the document.
  • the determined length boundary direction is extended to both sides and the width boundary direction is extended to both sides to obtain the intersection point of the length boundary direction and the width boundary direction, and the intersection point is determined as the vertex coordinates representing one of the four corner vertices of the document.
  • the vertex coordinates are combined with the length boundary direction and the length of the document in the picture to determine the length boundary, and the vertex coordinates are combined with the width boundary direction and the width of the document in the picture to determine the width boundary.
  • a rectangular frame is formed based on the length boundary and the width boundary to obtain the rectangular boundary of the certificate in the picture.
  • the area of the smallest enclosing rectangle that contains the most facial feature points of the document in the picture and the coordinate clustering center representing the center of the facial feature points are combined with the proportional relationship and relative position relationship of the target standard document to calculate that the document is in the picture.
  • the rectangular boundary corresponds to the rectangular boundary in, accurately obtain the rectangular area boundary corresponding to the document, so that the detection result is more accurate.
  • a third embodiment of the four-corner defect detection method of the present application is proposed.
  • the image is extracted by the certificate
  • the steps following the step of forming a rectangular area by the rectangular boundary include:
  • Step S31 Obtain the length and width of the rectangular area, and calculate the pixel value corresponding to the length of the rectangular area, and whether any one of the pixel values corresponding to the width of the rectangular area is greater than a preset threshold;
  • the server obtains the length and width of the rectangular area corresponding to the certificate, and calculates the pixel value corresponding to the length of the rectangular area according to the length value and pixels of the rectangular area, and calculates the pixel value corresponding to the rectangular area according to the width and pixels of the rectangle.
  • the pixel value corresponding to the width it is judged whether any one of the pixel value corresponding to the length of the rectangular area and the pixel value corresponding to the width of the rectangular area is greater than a preset threshold that characterizes sufficient or insufficient sharpness, to determine the rectangle in the picture that characterizes the document. Whether the content of the area is clear, it is convenient to determine whether the rectangular area is divided into equal parts of sub-pictures.
  • Step S32 if any one of the pixel value corresponding to the length of the rectangular area and the pixel corresponding to the width of the rectangular area is greater than a preset threshold, the rectangular area is divided according to a first preset
  • the method is divided into multiple sub-pictures, and the sub-pictures corresponding to the four corners of the rectangular area among the multiple sub-pictures are used as target sub-pictures to detect the four corners of the rectangular area based on each of the target sub-pictures. Whether there are missing corners;
  • the preset threshold in this embodiment is set to 2000 based on experience, It means that the content of the rectangular area is clear enough, and the rectangular area is divided into a plurality of sub-pictures according to the preset first preset segmentation method, wherein the first preset segmentation method is set according to requirements, as in this embodiment. Set the nine-equal division method to divide the rectangular area into 9 sub-pictures. Thereafter, from the segmented sub-pictures, the sub-pictures located in the four corners of the rectangular area are determined as the target sub-pictures.
  • the 4 sub-pictures located in the upper left corner, upper right corner, lower left corner, and lower right corner are the sub-pictures corresponding to the four corners of the rectangular area, and they are used as the target sub-pictures to facilitate Detect whether there are missing corners in the 4 sub-pictures.
  • Step S33 If the pixel value corresponding to the length of the rectangular area and the pixel corresponding to the width of the rectangular area are both less than or equal to a preset threshold, the rectangular area is cut according to a second preset splitting method. Divide into a plurality of sub-pictures, and use the plurality of sub-pictures as target sub-pictures to detect whether there are missing corners in the four corners of the rectangular area based on each of the target sub-pictures.
  • the second preset segmentation method is divided into a plurality of sub-pictures as target sub-pictures, and the second preset segmentation method is set according to requirements. For example, in this embodiment, a four-equal division method is preset, and the rectangular area is divided into 4 sub-pictures, and the 4 sub-pictures are used as target sub-pictures, so as to detect whether there are missing corners in the 4 target sub-pictures.
  • the step of detecting whether there are missing corners in the four corners of the rectangular area, and if there are missing corners, determining that the certificate in the received picture is a broken certificate includes;
  • Step S34 Detect each of the target sub-pictures one by one in a preset manner, and determine whether the target sub-pictures all include a complete document corner;
  • this embodiment is preset with a preset method for detecting whether a picture is incomplete, such as the inceptionv3 detection method, to detect the 4 target sub-pictures obtained by segmentation one by one through the preset method, specifically, the 4 target sub-pictures are detected one by one.
  • the sub-pictures are imported into inceptionv3 one by one for detection to determine whether the four target sub-pictures all contain a complete ID corner. Understandably, the integrity of the document corner is obtained by comparing it with the document corner of the target standard document. For example, if the document corner of the ID card is rounded, it will be detected whether the document corner contained in the target sub-picture is the same as that of the ID card. The document angle is the same.
  • Step S35 if the target sub-pictures all contain a complete ID corner, it is determined that the received picture is valid;
  • the business processing corresponding to the user's request is performed.
  • Step S36 if there is a missing corner in any one of the target sub-images in the target sub-picture, determine that the certificate in the received picture is a broken certificate, determine that the received picture is invalid, and output the re-collected Prompt information.
  • the four target sub-pictures are detected one by one, and it is detected that the certificate corner in any one of the four target sub-pictures is incomplete, it means that the certificate in the picture is incomplete. It is determined that it is a broken document, where the broken document may be that the document itself is worn or accidentally caused by the loss of the document corner when the document is in use, or it may be that the user covers the corner of the document when the document is photographed. As a result, one of the document corners of the document in the photographed picture is missing. Further, it is determined that the received picture is invalid, and a message is output to prompt the user to take the photo of the certificate again.
  • the server detects the pixel value corresponding to the length of the rectangular area and the pixel value corresponding to the width of the rectangular area to determine whether the content of the rectangular area that characterizes the document is sufficiently clear, and differentiates the rectangular area based on different definitions.
  • the number of sub-pictures are segmented to more accurately detect the four corners of the rectangular area. By detecting whether the target sub-pictures selected from the sub-pictures all contain a complete ID corner, it is determined whether the received picture is valid.
  • This embodiment realizes that the complete document angle detection is performed on the segmented pictures to determine whether the document is complete, so as to facilitate the user to perform business processing such as document recognition or remote account opening.
  • the step of obtaining the rectangular boundary of the certificate in the picture includes:
  • Step S40 Obtain the standard area, standard length, standard width, standard cluster center of each type of standard certificate, and the minimum standard area of the characteristic circumscribed rectangle of the facial feature points in the standard certificate;
  • the size data of various types of standard certificates actually used are obtained in advance, and the obtained content includes the standard area, standard length, and standard width of the standard certificate, as well as the characteristic circumscribed rectangle containing the facial feature points in the standard certificate.
  • the minimum standard area of, and the standard cluster center for clustering each face feature point so that the server can call the size data for comparison and calculation. Understandably, considering that different types of standard documents have different outer frame sizes, or even if the outer frame sizes are the same, they may have different sizes of faces or faces in different positions, so that different types of standard documents are in the standard area. There are differences in standard length, standard width, minimum standard area, and standard clustering center. Therefore, the above-mentioned size data can be obtained for different types of standard documents. Steps S50, S60, and S70 are processed one by one.
  • Step S50 based on the standard length and the minimum standard area, generate a first proportional relationship between the standard length and the minimum standard area, and generate the standard width and the minimum standard area based on the standard width and the minimum standard area.
  • the ratio between the standard length of the standard document and the minimum standard area is generated to generate the first proportional relationship that characterizes the relationship between the standard length and the minimum standard area.
  • the ratio between the standard width and the minimum standard area of the standard document is used to generate the standard width and the minimum standard area.
  • the second proportional relationship of the minimum standard area relationship is used to generate the first proportional relationship that characterizes the relationship between the standard length and the minimum standard area.
  • Step S60 based on the standard length and the standard cluster center, generate a first relative positional relationship between the standard cluster center and the standard length, and generate all the standard cluster centers based on the standard width and the standard cluster centers.
  • the second relative positional relationship between the standard cluster center and the standard width is based on the standard length and the standard cluster center.
  • the distance between the standard cluster center in the standard document and the standard length of the standard document is calculated. This distance represents the positional relationship of the standard cluster center relative to the standard length, and it is regarded as the standard cluster center and the standard length.
  • the first relative positional relationship between the long is calculated.
  • the size data information of each type of standard certificate is obtained in advance, and based on the size data information of the standard certificate, the proportional relationship and relative position relationship of the standard certificate are generated, so that the server can call the size data of the standard certificate and the proportion of the standard certificate. Relationship and relative position relationship, calculate the length and width of the certificate in the received picture and determine the specific position of the rectangular area corresponding to the certificate.
  • this application also provides a device for detecting the four corners of the credential.
  • FIG. 3 is a schematic diagram of the functional modules of the first embodiment of the device for detecting four corners of the credential defect of this application.
  • the four-corner defect detection device of the document includes:
  • the obtaining module 10 is configured to, when a picture containing a certificate is received, obtain the feature point coordinates of the face in the certificate contained in the picture, obtain the coordinate cluster center and the smallest bounding rectangle based on the feature point coordinates, and obtain the The area of the smallest enclosing rectangle;
  • the calculation module 20 is configured to calculate the rectangular boundary of the certificate in the picture based on the area of the smallest bounding rectangle and the coordinate clustering center;
  • the extraction module 30 is configured to extract the rectangular area formed by the rectangular boundary of the certificate in the picture, and detect whether there are missing corners in the four corners of the rectangular area, and if there are missing corners, determine whether there is a missing corner in the received picture
  • the document is incomplete.
  • the acquiring module 10 when a picture containing a document is received, the acquiring module 10 first obtains the coordinates of the characteristic points of the face in the document contained in the picture, and obtains the coordinate clustering center based on the coordinates of the characteristic points.
  • the calculation module 20 calculates the rectangular boundary of the document in the picture based on the area of the smallest circumscribed rectangle and the coordinate clustering center;
  • the extraction module 30 extracts the rectangular area formed by the rectangular border of the certificate in the picture, and detects whether there are missing corners in the four corners of the rectangular area, and if there are missing corners, it is determined that the certificate in the received picture is It is a broken document. Determine the rectangular area corresponding to the document through the smallest enclosing rectangle and coordinate clustering center of the document in the picture, and check whether the four corners of the rectangular area are missing corners one by one. Compared with the detection based on the entire document picture, the detection accuracy is improved. It can accurately detect whether the certificate in the picture is incomplete.
  • the acquisition module 10 includes:
  • the first acquiring unit is configured to extract multiple feature points of the face in the document through a preset neural network when a picture containing the document is received, and acquire the feature point coordinates of the multiple feature points;
  • the clustering unit is used to cluster the coordinates of each feature point of the face in the certificate by using a preset algorithm to obtain the center coordinates of the coordinates of each feature point of the face in the certificate, as the coordinate clustering center;
  • the first determining unit is configured to determine the minimum circumscribed rectangle according to the position of each of the characteristic point coordinates of the face in the document, and detect the length and width of the minimum circumscribed rectangle, and pass the length and the sum of the minimum circumscribed rectangle The width is calculated to obtain the area of the minimum circumscribed rectangle.
  • calculation module 20 includes:
  • An identification unit configured to identify the type of the certificate in the picture, determine the target standard certificate corresponding to the type according to the type of the certificate, and obtain the target standard area of the target circumscribed rectangle in the target standard certificate;
  • the calculation unit is configured to calculate the length and width of the document based on the proportional relationship of the target standard document and the area of the minimum circumscribed rectangle, wherein the proportional relationship includes the target standard length of the target standard document and the area The first target proportional relationship between the target standard areas, and the second target proportional relationship between the target standard width of the target standard certificate and the target standard area;
  • the second determining unit is configured to determine the rectangular boundary of the document based on the relative positional relationship of the target standard document, the length and width of the document, and the coordinate clustering center, wherein the relative positional relationship includes all The first target relative position relationship between the target standard length of the target standard certificate and the target cluster center of the target standard certificate, and the target standard width of the target standard certificate and the target cluster center of the target standard certificate The relative positional relationship between the second target.
  • calculation module 20 further includes:
  • a third determining unit configured to determine the length boundary direction of the document in the picture based on the relative positional relationship between the coordinate clustering center and the first target;
  • a fourth determining unit configured to determine the width boundary direction of the document in the picture based on the relative positional relationship between the coordinate clustering center and the second target;
  • the fifth determining unit is configured to determine the length boundary of the document based on the length of the document and the length boundary direction, and determine the width boundary of the document based on the width of the document and the width boundary direction, and The length boundary and the width boundary determine the rectangular boundary of the document.
  • calculation module 20 further includes:
  • the second acquiring unit is used to acquire the standard area, standard length, standard width, standard clustering center, and the minimum standard area of the characteristic circumscribed rectangle of the facial feature points in the standard certificate of various types of standard certificates;
  • the execution unit is used to execute the following steps one by one for each type of the standard certificate:
  • the first generating unit is configured to generate a first proportional relationship between the standard length and the minimum standard area based on the standard length and the minimum standard area, and generate the standard width and the minimum standard area based on the standard length and the minimum standard area.
  • the second generating unit is configured to generate a first relative positional relationship between the standard cluster center and the standard length based on the standard length and the standard cluster center, and based on the standard width and the standard cluster Center, generating a second relative positional relationship between the standard cluster center and the standard width.
  • the extraction module 30 includes:
  • the third acquiring unit is configured to acquire the length and width of the rectangular area, and calculate the pixel value corresponding to the length of the rectangular area, and whether any one of the pixel values corresponding to the width of the rectangular area is greater than Preset threshold;
  • the first segmentation unit is used for if any one of the pixel value corresponding to the length of the rectangular area and the pixel corresponding to the width of the rectangular area is greater than a preset threshold, then the rectangular area is set according to the first
  • a preset segmentation method is divided into a plurality of sub-pictures, and the sub-pictures corresponding to the four corners of the rectangular area among the plurality of sub-pictures are used as target sub-pictures to detect the Whether there are missing corners in the four corners of the rectangular area;
  • the second segmentation unit is configured to: if the pixel value corresponding to the length of the rectangular area and the pixel corresponding to the width of the rectangular area are both less than or equal to the preset threshold, then the rectangular area is divided according to the second preset threshold.
  • the segmentation method is divided into multiple sub-pictures, and the multiple sub-pictures are used as target sub-pictures to detect whether there are missing corners in the four corners of the rectangular area based on each of the target sub-pictures.
  • the extraction module 30 further includes:
  • the detection unit is configured to detect each of the target sub-pictures one by one in a preset manner to determine whether the target sub-pictures all include a complete document corner;
  • the first determining unit is configured to determine that the received image is valid if all the target sub-pictures contain a complete document corner;
  • the second determining unit is configured to determine that the credential in the received picture is a broken credential if there is a missing corner in any one of the target sub-images, determine that the received picture is invalid and The prompt message for re-collection is output.
  • the application also provides a four-corner defect detection device for a document.
  • the four-corner defect detection device includes a memory, a processor, and a four-corner defect detection program that is stored on the memory and can run on the processor. When the detection program is executed by the processor, the following steps are implemented:
  • the present application also provides a storage medium, the storage medium may be volatile or non-volatile, the storage medium stores a four-corner defect detection program of the document, and the four-corner defect detection program is executed by a processor.
  • the blockchain referred to in this application is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and the generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
  • the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM) as described above. , Magnetic disks, optical disks), including several instructions to make a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the method described in each embodiment of the present application.
  • a terminal device which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Image Analysis (AREA)

Abstract

La présente invention concerne un procédé et un appareil de détection de défauts pour quatre coins d'un certificat, et un dispositif et un support de stockage. Le procédé comporte les étapes consistant: lorsqu'une image incluant un certificat est reçue, à acquérir une coordonnée de point caractéristique d'une face sur le certificat inclus dans l'image, à obtenir un centre de regroupement de coordonnées et le rectangle de délimitation minimal sur la base de la coordonnée de point caractéristique, et à acquérir l'aire du rectangle de délimitation minimal; à calculer et à obtenir une limite rectangulaire du certificat dans l'image sur la base de l'aire du rectangle de délimitation minimal et le centre de regroupement de coordonnées; et à déterminer une région rectangulaire formée par la limite rectangulaire du certificat dans l'image, à découper la région rectangulaire en une pluralité de sous-images, à détecter s'il existe un coin manquant dans la pluralité de sous-images, et s'il existe un coin manquant, à déterminer que le certificat dans l'image reçue est un certificat défectueux. Dans le procédé, au moyen du rectangle de délimitation minimal et d'un centre de regroupement de coordonnées d'un certificat dans une image, une région rectangulaire correspondant au certificat est déterminée, et le caractère manquant ou non de chacun des quatre coins de la région rectangulaire est détecté un par un, de sorte que la précision de détection est améliorée. Le procédé se rapporte en outre à la technologie des chaînes de blocs, et l'image du certificat peut être conservée dans un nœud de chaîne de blocs.
PCT/CN2020/135850 2020-04-24 2020-12-11 Procédé et appareil de détection de défauts pour quatre coins d'un certificat, et dispositif et support de stockage WO2021212873A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010336193.3A CN111553251B (zh) 2020-04-24 2020-04-24 证件四角残缺检测方法、装置、设备及存储介质
CN202010336193.3 2020-04-24

Publications (1)

Publication Number Publication Date
WO2021212873A1 true WO2021212873A1 (fr) 2021-10-28

Family

ID=72000264

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/135850 WO2021212873A1 (fr) 2020-04-24 2020-12-11 Procédé et appareil de détection de défauts pour quatre coins d'un certificat, et dispositif et support de stockage

Country Status (2)

Country Link
CN (1) CN111553251B (fr)
WO (1) WO2021212873A1 (fr)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117036735A (zh) * 2023-10-08 2023-11-10 超创数能科技有限公司 一种基于气孔识别的瓷质产品的性能检测方法及装置

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111553251B (zh) * 2020-04-24 2024-05-07 平安科技(深圳)有限公司 证件四角残缺检测方法、装置、设备及存储介质
CN112541899B (zh) * 2020-12-15 2023-12-22 平安科技(深圳)有限公司 证件的残缺检测方法、装置、电子设备及计算机存储介质
CN112883959B (zh) * 2021-01-21 2023-07-25 平安银行股份有限公司 身份证照完整性检测方法、装置、设备及存储介质
CN113313726A (zh) * 2021-06-28 2021-08-27 安徽信息工程学院 一种社保卡的识别方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202815870U (zh) * 2012-04-28 2013-03-20 王浩 一种证件照片与人脸自动识别系统
KR101792001B1 (ko) * 2017-01-02 2017-11-01 주식회사 올아이티탑 지문인식과 연동되어 nfc모듈 근거리 무선 통신 및 사진정보를 표출시키는 융합카드의 인증시스템 및 그 처리방법과 알고리즘
CN107358187A (zh) * 2017-07-04 2017-11-17 四川云物益邦科技有限公司 一种证件照片识别方法
CN110766007A (zh) * 2019-10-28 2020-02-07 深圳前海微众银行股份有限公司 证件遮挡检测方法、装置、设备及可读存储介质
CN111553251A (zh) * 2020-04-24 2020-08-18 平安科技(深圳)有限公司 证件四角残缺检测方法、装置、设备及存储介质

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110516666B (zh) * 2019-07-10 2023-01-17 西安电子科技大学 基于mser和isodata相结合的车牌定位方法
CN110427909B (zh) * 2019-08-09 2023-04-28 连连银加信息技术有限公司 一种移动端驾驶证检测方法、系统及电子设备和存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202815870U (zh) * 2012-04-28 2013-03-20 王浩 一种证件照片与人脸自动识别系统
KR101792001B1 (ko) * 2017-01-02 2017-11-01 주식회사 올아이티탑 지문인식과 연동되어 nfc모듈 근거리 무선 통신 및 사진정보를 표출시키는 융합카드의 인증시스템 및 그 처리방법과 알고리즘
CN107358187A (zh) * 2017-07-04 2017-11-17 四川云物益邦科技有限公司 一种证件照片识别方法
CN110766007A (zh) * 2019-10-28 2020-02-07 深圳前海微众银行股份有限公司 证件遮挡检测方法、装置、设备及可读存储介质
CN111553251A (zh) * 2020-04-24 2020-08-18 平安科技(深圳)有限公司 证件四角残缺检测方法、装置、设备及存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117036735A (zh) * 2023-10-08 2023-11-10 超创数能科技有限公司 一种基于气孔识别的瓷质产品的性能检测方法及装置
CN117036735B (zh) * 2023-10-08 2024-01-30 超创数能科技有限公司 一种基于气孔识别的瓷质产品的性能检测方法及装置

Also Published As

Publication number Publication date
CN111553251A (zh) 2020-08-18
CN111553251B (zh) 2024-05-07

Similar Documents

Publication Publication Date Title
WO2021212873A1 (fr) Procédé et appareil de détection de défauts pour quatre coins d'un certificat, et dispositif et support de stockage
US10699146B2 (en) Mobile document detection and orientation based on reference object characteristics
US20200410074A1 (en) Identity authentication method and apparatus, electronic device, and storage medium
WO2018028546A1 (fr) Procédé de positionnement de point clé, terminal et support de stockage informatique
WO2020233035A1 (fr) Procédé de vérification d'informations et appareil associé
AU2012200238B2 (en) Methods and Systems of Authentication
US10410053B2 (en) Method, apparatus, system, and storage medium for detecting information card in image
WO2021017272A1 (fr) Procédé et dispositif d'annotation d'une image de pathologie, appareil informatique et support d'informations
WO2018205789A1 (fr) Procédé et appareil de reconnaissance de direction de placement de carte, et appareil de traitement d'image
WO2022156178A1 (fr) Procédé et appareil de comparaison de cibles d'images, dispositif informatique et support de stockage lisible
US10354166B2 (en) Reading test cards using a mobile device
CN110675546A (zh) 发票图片识别及验真方法、系统、设备及可读存储介质
WO2021189853A1 (fr) Procédé et appareil de reconnaissance de la position d'une tache de lumière clignotante, dispositif électronique et support d'informations
EP4120121A1 (fr) Procédé, système et appareil de détection de vivacité de visage, dispositif informatique, et support de stockage
WO2022105569A1 (fr) Procédé et appareil de reconnaissance de direction de page et dispositif et support de stockage lisible par ordinateur
CN110795714A (zh) 一种身份验证方法、装置、计算机设备及存储介质
CN114359553B (zh) 一种基于物联网的签章定位方法、系统及存储介质
WO2021218183A1 (fr) Procédé et appareil de détection de bord de certificat, dispositif et support
CN113673500A (zh) 证件图像识别方法、装置、电子设备及存储介质
CN112528954A (zh) 一种证件图像文字提取方法
CN114694161A (zh) 一种特定版式证件的文本识别方法、设备及存储介质
CN112396047B (zh) 训练样本生成方法、装置、计算机设备和存储介质
WO2021147219A1 (fr) Procédé et appareil de reconnaissance de texte à base d'image, dispositif électronique et support de stockage
KR102252286B1 (ko) 이미지형 문서의 변화 감지 및 인식 장치 및 방법
CN113239339A (zh) 证件拍摄方法、装置、计算机设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20932000

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20932000

Country of ref document: EP

Kind code of ref document: A1