[go: up one dir, main page]

CN110929715A - Intelligent scanning method and device for terminal identity card and terminal - Google Patents

Intelligent scanning method and device for terminal identity card and terminal Download PDF

Info

Publication number
CN110929715A
CN110929715A CN201911172655.6A CN201911172655A CN110929715A CN 110929715 A CN110929715 A CN 110929715A CN 201911172655 A CN201911172655 A CN 201911172655A CN 110929715 A CN110929715 A CN 110929715A
Authority
CN
China
Prior art keywords
identification
image
terminal
identity card
card
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.)
Pending
Application number
CN201911172655.6A
Other languages
Chinese (zh)
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.)
Shenzhen Xinlian Credit Reporting Co ltd
Original Assignee
Shenzhen Xinlian Credit Reporting 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 Shenzhen Xinlian Credit Reporting Co ltd filed Critical Shenzhen Xinlian Credit Reporting Co ltd
Priority to CN201911172655.6A priority Critical patent/CN110929715A/en
Publication of CN110929715A publication Critical patent/CN110929715A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

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

Abstract

The invention relates to a terminal identity card intelligent scanning method, a device and a terminal, wherein the method comprises the following steps: continuously shooting the identity card through a terminal camera to obtain a scanning video stream; converting the scanning video stream to obtain a scanning image; preprocessing the scanned image to obtain an identification image; judging whether the identification image has corresponding identity card characteristics or not; if the identification card exists, acquiring coordinate information and occupied area of the identification card characteristic in the identification image; judging whether the coordinate information and the occupied area meet the requirements or not; and if the identification card meets the requirements, intercepting the identification image target area to obtain an identification card image. The identity card image is scanned through the camera of the terminal, the identity card image is quickly and accurately identified locally at the terminal by using the identification model, all operations are performed locally at the terminal, the identity card image does not need to be uploaded to the server side for verification and identification, the method is more efficient and quicker, and meanwhile, the method is not influenced by terminal network signals.

Description

Intelligent scanning method and device for terminal identity card and terminal
Technical Field
The invention relates to the field of identity card scanning and identification, in particular to a terminal identity card intelligent scanning method, a device and a terminal.
Background
With the development of the mobile internet, more and more applications of the mobile terminal relate to the input authentication (i.e. real name authentication) of the personal identification card information, and if the identification card number and the name are manually input, the speed is very slow, and the user experience is very poor.
In addition, traditional mobile terminal's APP ID card discernment is through the mode of manually shooing, uploads the ID card picture to the server discernment, is subject to mobile terminal's network quality to and the running state of server, when being in the position that the network is relatively poor, can't be fast accurate discern the identity and confirm.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a method and a device for intelligently scanning a terminal identity card and a terminal.
In order to achieve the purpose, the invention adopts the following technical scheme: a terminal identity card intelligent scanning method comprises the following steps:
continuously shooting the identity card through a terminal camera to obtain a scanning video stream;
converting the scanning video stream to obtain a scanning image;
preprocessing the scanned image to obtain an identification image;
judging whether the identification image has corresponding identity card characteristics or not;
if the identification card exists, acquiring coordinate information and occupied area of the identification card characteristic in the identification image;
judging whether the coordinate information and the occupied area meet the requirements or not;
and if the identification card meets the requirements, intercepting the identification image target area to obtain an identification card image.
Further, before the step of continuously acquiring the video stream of the identity card through the terminal camera, the method includes:
acquiring length and width information of a terminal screen;
and dynamically drawing a scanning frame at the center of the terminal screen according to the length and width information in proportion.
Further, the step of preprocessing the scanned image to obtain an identification image includes:
cutting an image of the scanned image in the scanning frame area to obtain an identification image;
and converting the identification image into a gray map, and binarizing the gray map.
Further, the step of judging whether the coordinate information and the occupied area meet the requirements includes:
determining coordinate information and occupied area of identity card features in an identification image through an identification model, wherein the identification model is obtained by training a convolutional neural network by taking identification image data of the identity card with identification as sample data;
and judging whether the coordinate information and the occupied area of the identity card feature meet the preset requirements or not.
Further, the passing through the identification model is a step of training a convolutional neural network by using the identification card image data with identification as sample data, and the step includes:
constructing a loss function and a convolutional neural network;
acquiring identification card image data with an identification to obtain sample data;
inputting sample data into a convolutional neural network for convolution calculation to obtain a sample output result, wherein the sample output result comprises coordinate information of the identity card characteristics and an occupied area;
inputting the sample output result and the identification card image data into a loss function to obtain a loss value;
adjusting parameters of the convolutional neural network according to the loss value;
and learning the convolutional neural network by using sample data and a deep learning frame to obtain an identification model.
The invention also adopts the following technical scheme: a terminal ID card intelligent scanning device includes:
the scanning shooting unit is used for continuously shooting the identity card through a terminal camera to obtain a scanning video stream;
a video conversion unit for converting the scan video stream to obtain a scan image;
the preprocessing unit is used for preprocessing the scanned image to obtain an identification image;
the existence judging unit is used for judging whether the corresponding identity card characteristics exist in the identification image or not;
the information acquisition unit is used for acquiring the coordinate information and the occupied area of the identification card characteristic in the identification image when the identification card characteristic exists;
the information judgment unit is used for judging whether the coordinate information and the occupied area meet the requirements or not;
and the image intercepting unit is used for intercepting and identifying the target area of the image to obtain the identity card image when the coordinate information and the occupied area meet the requirements.
Further, still include:
the size acquisition unit is used for acquiring length and width information of a terminal screen;
and the dynamic drawing unit is used for dynamically drawing the scanning frame at the center position of the terminal screen according to the length and width information in proportion.
Further, the preprocessing unit comprises a cutting module and a conversion module;
the cutting module is used for cutting the image of the scanning image in the scanning frame area to obtain an identification image;
and the conversion module is used for converting the identification image into a gray-scale image and binarizing the gray-scale image.
Further, the information judgment unit comprises an identification module, and the identification module is used for determining coordinate information and occupied area of the identity card features in the identification image through an identification model, wherein the identification model is obtained by training a convolutional neural network by taking identification-carrying identity card image data as sample data.
The invention also adopts the following technical scheme that the terminal comprises a memory and a processor, wherein the memory is stored with an application program, and the processor realizes the intelligent terminal identity card scanning method when executing the application program.
Compared with the prior art, the invention has the beneficial effects that: the camera through the terminal scans the identity card image to use the recognition model to carry out quick accurate discernment to the identity card image in that the terminal is local, all operations are all gone on at the terminal locally, need not to upload the identity card image to the server side and verify the discernment, and is more high-efficient swift, does not receive terminal network signal simultaneously and influences.
The invention is further described below with reference to the accompanying drawings and specific embodiments.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for intelligently scanning a terminal identification card according to an embodiment of the present invention;
fig. 2 is a schematic sub-flow diagram of a method for intelligently scanning a terminal identity card according to an embodiment of the present invention;
fig. 3 is a schematic sub-flow diagram of a method for intelligently scanning a terminal identification card according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a method for intelligently scanning a terminal identification card according to another embodiment of the present invention;
fig. 5 is a schematic block diagram of a terminal identity card intelligent scanning device provided in an embodiment of the present invention;
fig. 6 is a schematic block diagram of a preprocessing unit of the terminal identity card intelligent scanning device provided in the embodiment of the present invention;
fig. 7 is a schematic block diagram of an information determining unit of the terminal identity card intelligent scanning device according to the embodiment of the present invention;
fig. 8 is a schematic block diagram of a terminal identification card intelligent scanning device according to another embodiment of the present invention;
fig. 9 is a schematic block diagram of a terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention 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.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1, fig. 1 is a schematic flow chart of a terminal identity card intelligent scanning method according to an embodiment of the present invention. The terminal is used for continuously shooting the identity card through a mobile terminal camera to obtain a scanning video stream, locally processing the scanning video stream to obtain an identification image, acquiring coordinate information and occupied area of identity card features in the identification image, judging whether the coordinate information and the occupied area meet requirements through an identification model configured in the terminal to acquire the identity card image meeting the requirements, and locally finishing identity card image acquisition and verification at the terminal.
Fig. 1 is a schematic flow chart of a method for intelligently scanning a terminal identification card according to an embodiment of the present invention. As shown in fig. 1, the method includes the following steps S110 to S170.
And S110, continuously shooting the identity card through a terminal camera to obtain a scanning video stream.
In this embodiment, the terminal may be an electronic device with a camera, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device. The identity card of a shooting target is directly scanned through a camera of the terminal, a scanning video stream of the identity card can be obtained, the scanning video stream comprises image frames written with identity card information, and a plurality of different scanning images can be obtained after conversion and decomposition.
And S120, converting the scanning video stream to obtain a scanning image.
In this embodiment, a conversion process is performed on the scan video stream, the scan video stream is decomposed into a plurality of scan images, all the scan images form the scan video stream, and the status of the id cards in different scan images is different. Specifically, the scanned video stream in YUV format is converted into a scanned image in png format.
And S130, preprocessing the scanned image to obtain an identification image.
In this embodiment, the scan image obtained by decomposition is preprocessed to remove most of redundant image portions (non-identification card image portions) in the scan image, so as to obtain an identification image that can be directly used for feature identification, which is convenient for subsequently identifying the image features of the identification image.
Referring to fig. 2, in an embodiment, the step S130 includes a step S131 and a step S132.
S131, cutting the image of the scanning image in the scanning frame area to obtain an identification image.
In this embodiment, the scan frame is dynamically drawn at the center of the terminal screen in proportion according to the length and width information of the terminal screen, and is used to provide a scan area for scanning the identity card during scanning, and to cut the image in the scan frame, so as to obtain an identification image including an image of the identity card, and to remove a part of the redundant image (non-identity card image).
And S132, converting the identification image into a gray map, and binarizing the gray map.
In this embodiment, the recognition image is converted into a gray-scale image, and the gray-scale image is binarized, so that the recognition efficiency of the subsequent recognition image can be improved.
And S140, judging whether the identification image has corresponding identity card characteristics.
And S150, if the identification card exists, acquiring coordinate information and occupied area of the identification card characteristic in the identification image.
In this implementation, when the identification image includes the identification card features, the identification card image is scanned, and the identification card features include identification card face features, national emblem features, and the like. And after the specific identity card features are identified, further acquiring coordinate information and occupied area of the identity card features in the identification image, and further judging whether the identity card image in the identification image meets the requirements or not, and identifying the outline of the identity card image to further cut the identification image and obtain the final identity card image.
And S160, judging whether the coordinate information and the occupied area meet the requirements.
In this embodiment, whether the identity card features meet the requirements is determined by judging whether the coordinate information and the occupied area meet the requirements.
Referring to fig. 3, in an embodiment, step S160 includes steps S161 and S162.
And S161, determining coordinate information and occupied area of the identity card features in the identification image through an identification model, wherein the identification model is obtained by training a convolutional neural network by taking the identification image data as sample data.
In this embodiment, the recognition model is trained using a large amount of sample data to form the best identity card feature coordinate information and the occupied area interval. The coordinate information and the occupied area of the identity card features in the identification image can be identified and acquired through the identification model, and the identification model is used for further judging whether the requirements of the optimal identity card feature coordinate information and the occupied area interval are met.
In this embodiment, the identification model is constructed as follows:
a1, constructing a loss function and a convolution neural network.
And A2, acquiring the identification card image data to obtain sample data.
And A3, inputting the sample data into a convolutional neural network for convolution calculation to obtain a sample output result, wherein the sample output result comprises coordinate information and occupied area of the identity card characteristics.
And A4, inputting the sample output result and the identification card image data into a loss function to obtain a loss value.
And A5, adjusting the parameters of the convolutional neural network according to the loss value.
And A6, learning the convolutional neural network by using the sample data and adopting a deep learning framework to obtain a recognition model.
And S162, judging whether the coordinate information and the occupied area of the identity card feature meet the preset requirements.
In this embodiment, it is determined whether the identified identity card features are consistent, that is, whether the coordinate information and the occupied area of the identity card features identified by the identification model are within the optimal identity card feature coordinate information and occupied area interval, if so, the representative identification image includes an identity card image consistent with the specification, the identification image may be further processed to obtain an identity card image, and when the identification image does not meet the requirements, a new scanned image is selected to re-execute step S130.
And S170, if the identification image meets the requirements, intercepting the identification image target area to obtain an identity card image.
In this embodiment, when coordinate information and an occupied area of identification card features (faces, national emblems and the like) in an identification image meet requirements, specific coordinates of edges of the identification card can be obtained according to actual coordinates of the identification card features, further, coordinate information of a target area only containing the identification card image is obtained, the identification card image can be obtained by directly cutting according to the coordinate information of the target area, local identification and verification are performed according to the obtained identification card image, identification is not required to be uploaded to a server for identification, the specific identification information can be rapidly and efficiently scanned and recognized through a collection camera of a terminal, and identification verification is completed.
According to the scheme, the identity card image is scanned through the camera of the terminal, the identification model is used for identifying the identity card image quickly and accurately in the local terminal, all operations are performed in the local terminal, the identity card image does not need to be uploaded to the server side for verification and identification, the operation is more efficient and faster, and meanwhile, the operation is not influenced by a terminal network signal.
Fig. 4 is a flowchart illustrating an intelligent terminal identity card scanning method according to another embodiment of the present invention. As shown in fig. 4, the intelligent terminal identity card scanning method of the present embodiment includes steps S210-S290. Steps S230 to S290 correspond to steps S110 to S170 in the above embodiments, and are not described herein again. The added steps S210 and S220 in the present embodiment are explained in detail below.
S210, acquiring length and width information of a terminal screen.
And S220, dynamically drawing a scanning frame at the center of the terminal screen according to the length and width information in proportion.
In this embodiment, the screens of different terminals have different sizes, and dynamic rendering can ensure adaptation to different terminal resolutions according to the specific screen size, and the terminals scan the identity cards uniformly through the scanning frames to obtain scanned video streams.
Fig. 5 is a schematic block diagram of an intelligent scanning device for a terminal identification card according to an embodiment of the present invention. As shown in fig. 5, the present invention also provides an intelligent scanning device for a terminal identification card, corresponding to the above intelligent scanning method for a terminal identification card. The intelligent terminal identity card scanning device comprises a unit for executing the intelligent terminal identity card scanning method, and can be configured in a desktop computer, a tablet computer, a portable computer and other terminals. Specifically, referring to fig. 5, the intelligent terminal identification card scanning device includes a scanning and shooting unit 10, a video conversion unit 20, a preprocessing unit 30, a presence determining unit 40, an information obtaining unit 50, an information determining unit 60, and an image capturing unit 70.
And the scanning shooting unit 10 is used for continuously shooting the identity card through the terminal camera so as to obtain a scanning video stream.
In this embodiment, the terminal may be an electronic device with a camera, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device. The identity card of a shooting target is directly scanned through a camera of the terminal, a scanning video stream of the identity card can be obtained, the scanning video stream comprises image frames written with identity card information, and a plurality of different scanning images can be obtained after conversion and decomposition.
And a video conversion unit 20 for converting the scan video stream to obtain a scan image.
In this embodiment, a conversion process is performed on the scan video stream, the scan video stream is decomposed into a plurality of scan images, all the scan images form the scan video stream, and the status of the id cards in different scan images is different. Specifically, the scanned video stream in YUV format is converted into a scanned image in png format.
And the preprocessing unit 30 is used for preprocessing the scanned image to obtain an identification image.
In this embodiment, the scan image obtained by decomposition is preprocessed to remove most of redundant image portions (non-identification card image portions) in the scan image, so as to obtain an identification image that can be directly used for feature identification, which is convenient for subsequently identifying the image features of the identification image.
Referring to FIG. 6, in one embodiment, the pre-processing unit 30 includes a cropping module 31 and a transformation module 32.
And the cropping module 31 is used for cropping the image of the scanned image in the scanning frame area to obtain an identified image.
In this embodiment, the scan frame is dynamically drawn at the center of the terminal screen in proportion according to the length and width information of the terminal screen, and is used to provide a scan area for scanning the identity card during scanning, and to cut the image in the scan frame, so as to obtain an identification image including an image of the identity card, and to remove a part of the redundant image (non-identity card image).
And the conversion module 32 is used for converting the identification image into a gray map and binarizing the gray map.
In this embodiment, the recognition image is converted into a gray-scale image, and the gray-scale image is binarized, so that the recognition efficiency of the subsequent recognition image can be improved.
And the existence judging unit 40 is used for judging whether the corresponding identity card characteristics exist in the identification image.
And the information acquisition unit 50 is used for acquiring the coordinate information and the occupied area of the identification card characteristics in the identification image when the identification card characteristics exist.
In this embodiment, the presence determining unit 40 and the information acquiring unit 50 only represent that the identification card image is scanned when the identification card features are included in the identification image, where the identification card features include identification card face features, national emblem features, and the like. And after the specific identity card features are identified, further acquiring coordinate information and occupied area of the identity card features in the identification image, and further judging whether the identity card image in the identification image meets the requirements or not, and identifying the outline of the identity card image to further cut the identification image and obtain the final identity card image.
And an information judging unit 60 for judging whether the coordinate information and the occupied area meet the requirements.
In this embodiment, whether the identified identity card features meet is determined, that is, whether the coordinate information and the occupied area of the identity card features identified by the identification model are within the optimal identity card feature coordinate information and the occupied area interval is determined, if so, the representative identification image includes an identity card image meeting the specification, the identification image can be further processed to obtain an identity card image, and when the identification image does not meet the requirement, a new scanning image is selected for re-identification.
Referring to fig. 7, in an embodiment, the information determining unit 60 includes a recognition module 61, configured to determine coordinate information and an occupied area of the identification card feature in the recognition image through a recognition model, where the recognition model is obtained by training a convolutional neural network through identification card image data as sample data.
In this embodiment, the recognition model is trained using a large amount of sample data to form the best identity card feature coordinate information and the occupied area interval. The coordinate information and the occupied area of the identity card features in the identification image can be identified and acquired through the identification model, and the identification model is used for further judging whether the requirements of the optimal identity card feature coordinate information and the occupied area interval are met.
In this embodiment, the identification model is constructed as follows:
a1, constructing a loss function and a convolution neural network.
And A2, acquiring the identification card image data to obtain sample data.
And A3, inputting the sample data into a convolutional neural network for convolution calculation to obtain a sample output result, wherein the sample output result comprises coordinate information and occupied area of the identity card characteristics.
And A4, inputting the sample output result and the identification card image data into a loss function to obtain a loss value.
And A5, adjusting the parameters of the convolutional neural network according to the loss value.
And A6, learning the convolutional neural network by using the sample data and adopting a deep learning framework to obtain a recognition model.
And the image intercepting unit 70 is used for intercepting the target area of the identification image to obtain the identity card image when the coordinate information and the occupied area meet the requirements.
In this embodiment, when coordinate information and an occupied area of identification card features (faces, national emblems and the like) in an identification image meet requirements, specific coordinates of edges of the identification card can be obtained according to actual coordinates of the identification card features, further, coordinate information of a target area only containing the identification card image is obtained, the identification card image can be obtained by directly cutting according to the coordinate information of the target area, local identification and verification are performed according to the obtained identification card image, identification is not required to be uploaded to a server for identification, the specific identification information can be rapidly and efficiently scanned and recognized through a collection camera of a terminal, and identification verification is completed.
According to the scheme, the identity card image is scanned through the camera of the terminal, the identification model is used for identifying the identity card image quickly and accurately in the local terminal, all operations are performed in the local terminal, the identity card image does not need to be uploaded to the server side for verification and identification, the operation is more efficient and faster, and meanwhile, the operation is not influenced by a terminal network signal.
Fig. 8 is a schematic block diagram of a terminal identification card intelligent scanning device according to another embodiment of the present invention. As shown in fig. 8, the terminal identification card intelligent scanning apparatus of the present embodiment is added with a size obtaining unit 80 and a dynamic rendering unit 90 on the basis of the above embodiment.
And a size obtaining unit 80 for obtaining length and width information of the terminal screen.
And the dynamic drawing unit 90 is used for dynamically drawing the scanning frame at the center position of the terminal screen according to the length and width information in proportion.
In this embodiment, for the size obtaining unit 80 and the dynamic rendering unit 90, the screen sizes of different terminals are different, the dynamic rendering can ensure the adaptation to the resolutions of different terminals according to the specific screen size, and the terminals scan the id cards uniformly through the scanning frames to obtain the scanned video stream.
It should be noted that, as can be clearly understood by those skilled in the art, the specific implementation processes of the terminal identity card intelligent scanning device and each unit may refer to the corresponding descriptions in the foregoing method embodiments, and for convenience and conciseness of description, no further description is provided herein.
Referring to fig. 9, fig. 9 is a schematic block diagram of a terminal according to an embodiment of the present application. The terminal 500 may be an electronic device having a camera function, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device.
Referring to fig. 9, the terminal 500 includes a processor 502, a memory, and a network interface 505 connected by a system bus 501, wherein the memory may include a non-volatile storage medium 503 and an internal memory 504.
The non-volatile storage medium 503 may store an operating system 5031 and application programs 5032. The application 5032 includes program instructions that, when executed, cause the processor 502 to perform a method for smart scanning of a terminal identification card.
The processor 502 is configured to provide computing and control capabilities to support the operation of the overall terminal 500.
The internal memory 504 provides an environment for the application 5032 in the non-volatile storage medium 503 to run, and when the application 5032 is executed by the processor 502, the processor 502 may be enabled to execute a method for intelligently scanning the terminal identification card.
The network interface 505 is used for network communication with other devices. Those skilled in the art will appreciate that the configuration shown in fig. 9 is a block diagram of only a portion of the configuration associated with the present application, and does not constitute a limitation on the terminal 500 to which the present application is applied, and that a particular terminal 500 may include more or less components than those shown, or combine certain components, or have a different arrangement of components.
The processor 502 is configured to run an application 5032 stored in the memory.
It should be understood that, in the embodiment of the present Application, the Processor 502 may be a Central Processing Unit (CPU), and the Processor 502 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It will be understood by those skilled in the art that all or part of the flow of the method implementing the above embodiments may be implemented by an application program instructing associated hardware. The application program comprises program instructions, and the application program can be stored in a storage medium which is a computer readable storage medium. The program instructions are executed by at least one processor in the terminal system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium.
The storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, which can store various computer readable storage media.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, various elements or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the invention can be merged, divided and deleted according to actual needs. In addition, functional units in the embodiments of the present invention 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, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a terminal, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A terminal identity card intelligent scanning method is characterized by comprising the following steps:
continuously shooting the identity card through a terminal camera to obtain a scanning video stream;
converting the scanning video stream to obtain a scanning image;
preprocessing the scanned image to obtain an identification image;
judging whether the identification image has corresponding identity card characteristics or not;
if the identification card exists, acquiring coordinate information and occupied area of the identification card characteristic in the identification image;
judging whether the coordinate information and the occupied area meet the requirements or not;
and if the identification card meets the requirements, intercepting the identification image target area to obtain an identification card image.
2. The intelligent scanning method for the terminal identity card according to claim 1, wherein before the step of continuously acquiring the video stream of the identity card through the terminal camera, the method comprises:
acquiring length and width information of a terminal screen;
and dynamically drawing a scanning frame at the center of the terminal screen according to the length and width information in proportion.
3. The intelligent terminal identity card scanning method according to claim 2, wherein the step of preprocessing the scanned image to obtain the identification image comprises:
cutting an image of the scanned image in the scanning frame area to obtain an identification image;
and converting the identification image into a gray map, and binarizing the gray map.
4. The intelligent scanning method for the terminal identity card according to claim 1, wherein the step of judging whether the coordinate information and the occupied area meet the requirements comprises the steps of:
determining coordinate information and occupied area of identity card features in an identification image through an identification model, wherein the identification model is obtained by training a convolutional neural network by taking identification image data of the identity card with identification as sample data;
and judging whether the coordinate information and the occupied area of the identity card feature meet the preset requirements or not.
5. The intelligent terminal identity card scanning method according to claim 4, wherein the passing through the recognition model is a step of training a convolutional neural network by using image data of the identity card with the identification as sample data, and comprises the following steps:
constructing a loss function and a convolutional neural network;
acquiring identification card image data with an identification to obtain sample data;
inputting sample data into a convolutional neural network for convolution calculation to obtain a sample output result, wherein the sample output result comprises coordinate information of the identity card characteristics and an occupied area;
inputting the sample output result and the identification card image data into a loss function to obtain a loss value;
adjusting parameters of the convolutional neural network according to the loss value;
and learning the convolutional neural network by using sample data and a deep learning frame to obtain an identification model.
6. The utility model provides a terminal ID card intelligent scanning device which characterized in that includes:
the scanning shooting unit is used for continuously shooting the identity card through a terminal camera to obtain a scanning video stream;
a video conversion unit for converting the scan video stream to obtain a scan image;
the preprocessing unit is used for preprocessing the scanned image to obtain an identification image;
the existence judging unit is used for judging whether the corresponding identity card characteristics exist in the identification image or not;
the information acquisition unit is used for acquiring the coordinate information and the occupied area of the identification card characteristic in the identification image when the identification card characteristic exists;
the information judgment unit is used for judging whether the coordinate information and the occupied area meet the requirements or not;
and the image intercepting unit is used for intercepting and identifying the target area of the image to obtain the identity card image when the coordinate information and the occupied area meet the requirements.
7. The intelligent terminal identification card scanning device of claim 6, further comprising:
the size acquisition unit is used for acquiring length and width information of a terminal screen;
and the dynamic drawing unit is used for dynamically drawing the scanning frame at the center position of the terminal screen according to the length and width information in proportion.
8. The intelligent terminal identity card scanning device according to claim 6, wherein the preprocessing unit comprises a clipping module and a conversion module;
the cutting module is used for cutting the image of the scanning image in the scanning frame area to obtain an identification image;
and the conversion module is used for converting the identification image into a gray-scale image and binarizing the gray-scale image.
9. The intelligent terminal identification card scanning device according to claim 6, wherein the information determining unit comprises an identification module configured to determine coordinate information and an occupied area of identification card features in the identification image through an identification model, and the identification model is obtained by training a convolutional neural network using identification card image data as sample data.
10. A terminal, characterized in that the terminal comprises a memory and a processor, the memory stores an application program, and the processor implements the intelligent terminal identity card scanning method according to any one of claims 1 to 5 when executing the application program.
CN201911172655.6A 2019-11-26 2019-11-26 Intelligent scanning method and device for terminal identity card and terminal Pending CN110929715A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911172655.6A CN110929715A (en) 2019-11-26 2019-11-26 Intelligent scanning method and device for terminal identity card and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911172655.6A CN110929715A (en) 2019-11-26 2019-11-26 Intelligent scanning method and device for terminal identity card and terminal

Publications (1)

Publication Number Publication Date
CN110929715A true CN110929715A (en) 2020-03-27

Family

ID=69851898

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911172655.6A Pending CN110929715A (en) 2019-11-26 2019-11-26 Intelligent scanning method and device for terminal identity card and terminal

Country Status (1)

Country Link
CN (1) CN110929715A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111464716A (en) * 2020-04-09 2020-07-28 腾讯科技(深圳)有限公司 Certificate scanning method, device, equipment and storage medium
CN116721245A (en) * 2023-06-14 2023-09-08 北京奇艺世纪科技有限公司 A method, device, equipment and medium for judging the integrity of object recognition

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190050626A1 (en) * 2011-05-18 2019-02-14 Nextgenid, Inc. Device for collecting personal data from user
CN109697412A (en) * 2018-12-11 2019-04-30 武汉虹信技术服务有限责任公司 A kind of identity card scanning record method based on OCR and face recognition technology
CN110008909A (en) * 2019-04-09 2019-07-12 浩鲸云计算科技股份有限公司 An AI-based real-name business real-time audit system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190050626A1 (en) * 2011-05-18 2019-02-14 Nextgenid, Inc. Device for collecting personal data from user
CN109697412A (en) * 2018-12-11 2019-04-30 武汉虹信技术服务有限责任公司 A kind of identity card scanning record method based on OCR and face recognition technology
CN110008909A (en) * 2019-04-09 2019-07-12 浩鲸云计算科技股份有限公司 An AI-based real-name business real-time audit system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
汤慧萍等: "《金属纤维多孔材料孔结构及性能》", 31 October 2016 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111464716A (en) * 2020-04-09 2020-07-28 腾讯科技(深圳)有限公司 Certificate scanning method, device, equipment and storage medium
CN111464716B (en) * 2020-04-09 2022-08-19 腾讯科技(深圳)有限公司 Certificate scanning method, device, equipment and storage medium
CN116721245A (en) * 2023-06-14 2023-09-08 北京奇艺世纪科技有限公司 A method, device, equipment and medium for judging the integrity of object recognition

Similar Documents

Publication Publication Date Title
US11494577B2 (en) Method, apparatus, and storage medium for identifying identification code
CN108229526B (en) Network training method, network training device, image processing method, image processing device, storage medium and electronic equipment
CN109961040B (en) Identity card area positioning method and device, computer equipment and storage medium
CN112308866B (en) Image processing method, device, electronic equipment and storage medium
JP2016523397A (en) Method and system for information recognition
JP2023515654A (en) Image optimization method and device, computer storage medium, computer program, and electronic equipment
CN110913205B (en) Video special effect verification method and device
CN112348765A (en) Data enhancement method and device, computer readable storage medium and terminal equipment
CN111027450A (en) Bank card information identification method and device, computer equipment and storage medium
CN106068537A (en) For the method and apparatus processing image
WO2022247702A1 (en) Image processing method and apparatus, electronic device, and storage medium
CN109615620B (en) Image compression degree identification method, device, equipment and computer readable storage medium
CN111027545A (en) Card picture mark detection method and device, computer equipment and storage medium
CN114359048A (en) Image data enhancement method, device, terminal device and storage medium
CN112839167A (en) Image processing method, image processing device, electronic equipment and computer readable medium
CN110321908A (en) Image-recognizing method, terminal device and computer readable storage medium
CN111435445A (en) Training method and device of character recognition model and character recognition method and device
CN107123124A (en) Retina image analysis method and device and computing equipment
CN110929715A (en) Intelligent scanning method and device for terminal identity card and terminal
CN110211195B (en) Method, device, electronic equipment and computer-readable storage medium for generating image set
CN111882565B (en) Image binarization method, device, equipment and storage medium
CN110210314B (en) Face detection method, device, computer equipment and storage medium
CN114926801B (en) Lane line recognition method, device, electronic device and storage medium
CN112991191A (en) Face image enhancement method and device and electronic equipment
CN113392821B (en) Dynamic gesture recognition method and device, electronic equipment and 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200327