CN111275047A - Identity card information importing method, system, device and storage medium - Google Patents

Identity card information importing method, system, device and storage medium Download PDF

Info

Publication number
CN111275047A
CN111275047A CN202010035413.9A CN202010035413A CN111275047A CN 111275047 A CN111275047 A CN 111275047A CN 202010035413 A CN202010035413 A CN 202010035413A CN 111275047 A CN111275047 A CN 111275047A
Authority
CN
China
Prior art keywords
identity card
image
information
card information
importing
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
CN202010035413.9A
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.)
Zhuhai Huaxing Software Information Service Co ltd
Original Assignee
Zhuhai Huaxing Software Information Service 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 Zhuhai Huaxing Software Information Service Co ltd filed Critical Zhuhai Huaxing Software Information Service Co ltd
Priority to CN202010035413.9A priority Critical patent/CN111275047A/en
Publication of CN111275047A publication Critical patent/CN111275047A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/153Segmentation of character regions using recognition of characters or words
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Character Input (AREA)

Abstract

The invention discloses an identity card information importing method, system, device and storage medium, wherein the method comprises the following steps: acquiring an identity card image and carrying out image processing on the identity card image to obtain image information; identifying the image information based on the training model to obtain identity card information and coding the identity card information; and generating an XML file and importing the coded identity card information into the XML file. The system comprises: the device comprises an image acquisition module, an image identification module and an information import module. The device comprises a memory and a processor for executing the identity card information importing method. By using the method and the device, the speed of the information input of the identity card can be improved while the labor cost is reduced. The method, the system, the device and the storage medium for importing the identity card information can be widely applied to the field of information import.

Description

Identity card information importing method, system, device and storage medium
Technical Field
The present invention relates to the field of information import, and in particular, to a method, a system, an apparatus, and a storage medium for identifying identification card information.
Background
In some situations, identity card information needs to be acquired, such as management of enterprise labor resources and login by using an identity authentication name. At present, part of enterprises collect identity card information by combining identity card readers, but the method needs to invest cost to purchase hardware which is easy to damage and needs manual maintenance, and the cost is too high; some enterprises manually input the information of the identity card, the manual input speed is low, the user experience is poor, and particularly, when mass employees need to input the identity card, the information input work is more complicated and needs to spend a large amount of time.
Disclosure of Invention
In order to solve the above technical problems, an object of the present invention is to provide a method, a system, a device and a storage medium for importing information of an identification card, which can quickly identify the information of the identification card and import the information into the system.
The first technical scheme adopted by the invention is as follows: an identity card information importing method comprises the following steps:
acquiring an identity card image and carrying out image processing on the identity card image to obtain image information;
identifying the image information based on the training model to obtain identity card information and coding the identity card information;
and generating an XML file and importing the coded identity card information into the XML file.
Further, the step of obtaining the identification card image to perform image processing on the identification card image to obtain image information specifically includes:
acquiring an identity card image and graying the identity card image to acquire the gray value of each pixel;
and comparing the gray value of each pixel with a preset threshold value to obtain image information.
Further, the step of acquiring the identity card image and graying the identity card image to acquire the gray value of each pixel specifically includes:
graying the ID card image according to the following formula to obtain the gray value of each pixel:
F(x)=R*0.3+G*0.51+B*0.11;
f (x) is the gray value of the pixel, and R, G, B is the red, green, blue value of the pixel.
Further, the step of recognizing the image information based on the training model to obtain the identity card information and encoding the identity card information specifically includes:
establishing a training model, and carrying out text positioning and head portrait photo acquisition on image information according to the training model to obtain text information and head portrait information;
and carrying out anti-interference identification on the text information and the head portrait information to obtain the identity card information.
Further, the step of obtaining the identity card image is to convert YUV item number data collected by a camera into a bitmap image, cut the bitmap image, and separate an irrelevant background area to obtain the identity card image.
Further, the text positioning and the head portrait photo acquisition are realized by distinguishing a text region and an image region in a clustering mode through color, brightness and edge information of image information.
Further, the anti-interference identification comprises filtering background shading interference, shading font correction and word error correction of the identity card.
The second technical scheme adopted by the invention is as follows: an identity card information import system comprising:
the image acquisition module is used for acquiring an identity card image and carrying out image processing on the identity card image to obtain image information;
the image recognition module is used for recognizing the image information based on the training model to obtain identity card information and coding the identity card information;
and the information import module is used for generating an XML file and importing the coded identity card information into the XML file.
The third technical scheme adopted by the invention is as follows: an identity card information importing apparatus, comprising:
at least one processor;
at least one memory for storing at least one program;
when the at least one program is executed by the at least one processor, the at least one program causes the at least one processor to implement the method for importing identity card information as described above.
The fourth technical scheme adopted by the invention is as follows: a storage medium having stored therein instructions executable by a processor, the storage medium comprising: the processor-executable instructions, when executed by the processor, are for implementing an identification card information import method as described above.
The method, the system, the device and the storage medium have the advantages that: the invention obtains the identity card information by carrying out image processing and image recognition on the identity card image, improves the information input speed, reduces the time spent by enterprises in inputting the identity card information in labor resource management and the like, and can directly bring the identity card information into an XML file for obtaining the stored identity card information by encoding and importing the identity card information into the XML file for storage when the identity card information is needed next time.
Drawings
FIG. 1 is a flowchart illustrating steps of an identity card information importing method according to the present invention;
fig. 2 is a block diagram of an identity card information importing system according to the present invention.
Detailed Description
The invention is described in further detail below with reference to the figures and the specific embodiments. The step numbers in the following embodiments are provided only for convenience of illustration, the order between the steps is not limited at all, and the execution order of each step in the embodiments can be adapted according to the understanding of those skilled in the art.
In some scenes needing to input data, such as the identity information of an enterprise statistics staff, or the identity card information of the staff needing to be input when the enterprise processes the new staff to enter, particularly when the identity card information is input in a large batch, by using the method, the input speed of the identity card information can be improved without adding hardware equipment, the workload of staff managing labor resources is reduced, the function can be deployed on a server of the function through a calling interface, when the function needs to be used, the identification Service is called through a Web Service interface, after the identification is finished by uploading an identity card image at the server end, a standard XML identification result is returned, the whole identification process is finished in an intranet, and the safety of data is ensured.
As shown in fig. 1, the present invention provides an identity card information importing method, which includes the following steps:
s101, obtaining an identity card image and carrying out image processing on the identity card image to obtain image information.
Specifically, the mode of acquiring the identity card image may be to shoot the identity card image through a camera or directly load the identity card image from an album, process and identify the image to obtain processed image information, and also to acquire the identity card image through a video preview mode to realize automatic acquisition of the identity card information. In addition, large batch of identity card information is recorded by regularly snapshotting the camera, and the camera is controlled by the timer to continuously shoot at a certain time interval.
S102, identifying image information based on a training model to obtain identity card information and coding the identity card information;
s103, generating an XML file and importing the coded identity card information into the XML file.
Specifically, a training model is established, the recognition result is obtained according to characters and English of a training data path recognition image, the training model can comprise various image recognition algorithms and anti-interference recognition algorithms, the identification card information can be stored more conveniently by encoding the identification card information, after the identification card information is imported into an XML file, the information can be directly applied to a system by applying the XML file, the identification card information can be selectively stored, the identification card information can be directly exported from a storage file when the identification card information needs to be used, the identification card information does not need to be recorded again, and the method is more convenient.
Further, as a preferred embodiment of the method, the step of obtaining the identification card image to perform image processing on the identification card image to obtain the image information specifically includes:
acquiring an identity card image and graying the identity card image to acquire the gray value of each pixel;
and comparing the gray value of each pixel with a preset threshold value to obtain image information.
Specifically, graying the picture is to calculate the gray value of each pixel of the picture, wherein multiple calculation formulas can be selected, after graying the picture, the gray value of each pixel is compared with a preset threshold, if the gray value is greater than the threshold, the gray value is determined to be white, otherwise, the gray value is determined to be black, and therefore background information and character information are distinguished.
Further, as a preferred embodiment of the method, the step of acquiring the identity card image, graying the identity card image, and acquiring the grayscale value of each pixel specifically includes:
graying the identity card image according to the following formula to obtain the gray value of each pixel point:
F(x)=R*0.3+G*0.51+B*0.11;
f (x) is the gray value of the pixel, and R, G, B is the red, green, blue value of the pixel.
Specifically, red, green and blue of each pixel of the picture are taken out and substituted into the formula to calculate the gray value of each point
As a further preferred embodiment of the method, the step of recognizing the image information based on the training model to obtain the identity card information and encoding the identity card information specifically includes:
establishing a training model, and carrying out text positioning and head portrait photo acquisition on image information according to the training model to obtain text information and head portrait information;
and carrying out anti-interference identification on the text information and the head portrait information to obtain the identity card information.
Specifically, the training model carries out text positioning on the shot character part and head portrait acquisition on a head portrait area, and synchronously corrects inclined or shaded fonts; subsequently, the shading in the identity card is filtered, each Chinese character is segmented to perform character recognition, the head portrait on the identity card is intercepted, then the head portrait is coded by using Base64, the photo can be further acquired by self-photographing through a mobile phone camera after the head portrait is acquired, and the integration of the identity card photo and the face photo is preliminarily realized by comparing.
Further, as a preferred embodiment of the method, the step of obtaining the identity card image is to convert YUV item number data collected by a camera into a bitmap image, cut the bitmap image, and separate an irrelevant background area to obtain the identity card image.
Specifically, the identity card image is shot through a mobile phone or the identity card image is loaded from a mobile phone album, the data returned by a camera is acquired, the shooting is realized through a timer, for example, one image is shot in one second, or YUV data returned by the camera is converted into Bitmap, the Bitmap is rotated by 90 degrees and cut, the picture in a scanning area is cut, the Bitmap is a practical pixel array to represent the image, the image is simplified through utilizing the Bitmap to separate the identity card image area from an irrelevant background, and the image processing can be simpler.
Further, as a preferred embodiment of the method, the text positioning and the head portrait photo acquisition are realized by distinguishing a text region and an image region in a clustering mode through color, brightness and edge information of image information.
Further as a preferred embodiment of the method, the anti-interference identification comprises filtering background shading interference, shading font correction and word error correction of the identity card.
Specifically, text positioning and head portrait photo collection are achieved after a text area and an image area are distinguished, word error correction is achieved by means of Chinese word segmentation based on an algorithm statistical analysis model, pattern matching recognition is conducted on character features according to a training model, the character recognition further comprises segmentation of each Chinese character, recognition is conducted again after the Chinese character is segmented, intelligent correction can also be conducted, the image of the identity card is corrected into a standard rectangle, and normalization processing is conducted.
The specific embodiment of the invention is as follows:
when a large amount of identity card information needs to be input, the shooting speed of the camera is set through a timer, for example, the shooting is carried out once in two seconds, YUV data returned by the camera is converted into Bitmap, the image is rotated by 90 degrees and cut into Bitmap, the image in a scanning area is cut out, an irrelevant background area is cut and deleted to obtain an identity card image, the identity card image is subjected to image processing, the identity card image is converted into a gray-scale image through a formula, the average value of the gray-scale image is set to be a threshold value, the gray-scale value of each pixel point is compared with the threshold value, if the gray-scale value is larger than the threshold value, the white is determined, otherwise, the black is determined, and the image information is obtained. Setting a training data path, identifying characters and English, filtering background shading interference of the identity card, automatically analyzing each character of the identity card to perform character segmentation and identification, finally importing an identification result into a generated XML file according to name, address, nationality and identity, and importing the XML file into a database of software.
As shown in fig. 2, an identity card information importing system includes:
the image acquisition module is used for acquiring an identity card image and carrying out image processing on the identity card image to obtain image information;
the image recognition module is used for recognizing the image information based on the training model to obtain identity card information and coding the identity card information;
and the information import module is used for generating an XML file and importing the coded identity card information into the XML file.
Further as a preferred embodiment of the present system, the image acquisition module further comprises:
the gray level submodule is used for acquiring an identity card image and graying the identity card image to acquire the gray level value of each pixel;
and the comparison submodule is used for comparing the gray value of each pixel with a preset threshold value to obtain image information.
Further as a preferred embodiment of the present system, the image recognition module further comprises:
the distinguishing submodule is used for establishing a training model and carrying out text positioning and head portrait photo acquisition on the image information according to the training model to obtain text information and head portrait information;
the identification submodule is used for carrying out anti-interference identification on the text information and the head portrait information to obtain identity card information;
the contents in the above method embodiments are all applicable to the present system embodiment, the functions specifically implemented by the present system embodiment are the same as those in the above method embodiment, and the beneficial effects achieved by the present system embodiment are also the same as those achieved by the above method embodiment.
An authentication identity card information importing device:
at least one processor;
at least one memory for storing at least one program;
when the at least one program is executed by the at least one processor, the at least one program causes the at least one processor to implement an identity card information import method as described above.
The contents in the above method embodiments are all applicable to the present apparatus embodiment, the functions specifically implemented by the present apparatus embodiment are the same as those in the above method embodiments, and the advantageous effects achieved by the present apparatus embodiment are also the same as those achieved by the above method embodiments.
A storage medium having stored therein instructions executable by a processor, the storage medium comprising: the processor-executable instructions, when executed by the processor, are for implementing an identification card information import method as described above.
The contents in the above method embodiments are all applicable to the present storage medium embodiment, the functions specifically implemented by the present storage medium embodiment are the same as those in the above method embodiments, and the advantageous effects achieved by the present storage medium embodiment are also the same as those achieved by the above method embodiments.
While the preferred embodiments of the present invention have been illustrated and described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. An identity card information importing method is characterized by comprising the following steps:
acquiring an identity card image and carrying out image processing on the identity card image to obtain image information;
identifying the image information based on the training model to obtain identity card information and coding the identity card information;
and generating an XML file and importing the coded identity card information into the XML file.
2. The method for importing identity card information according to claim 1, wherein the step of obtaining the identity card image and performing image processing on the identity card image to obtain the image information specifically comprises:
acquiring an identity card image and graying the identity card image to acquire the gray value of each pixel;
and comparing the gray value of each pixel with a preset threshold value to obtain image information.
3. The method for importing the identity card information according to claim 2, wherein the step of acquiring the identity card image and graying the identity card image to acquire the grayscale value of each pixel specifically comprises:
graying the ID card image according to the following formula to obtain the gray value of each pixel:
F(x)=R*0.3+G*0.51+B*0.11;
f (x) is the gray value of the pixel, and R, G, B is the red, green, blue value of the pixel.
4. The method for importing identity card information according to claim 1, wherein the step of recognizing image information based on a training model to obtain identity card information and encoding the identity card information specifically comprises:
establishing a training model, and carrying out text positioning and head portrait photo acquisition on image information according to the training model to obtain text information and head portrait information;
and carrying out anti-interference identification on the text information and the head portrait information to obtain the identity card information.
5. The method for importing the identity card information according to claim 2, wherein: the step of obtaining the identity card image is to convert YUV item number data collected by a camera into a bitmap image, cut the bitmap image and separate an irrelevant background area to obtain the identity card image.
6. The method for importing the identity card information according to claim 4, wherein: the text positioning and the head portrait photo acquisition are realized by distinguishing a text area and an image area in a clustering mode through color, brightness and edge information of image information.
7. The method for importing the identity card information according to claim 4, wherein: the anti-interference identification comprises filtering background shading interference of the identity card, correcting shadow fonts and correcting words.
8. An identity card information import system, comprising:
the image acquisition module is used for acquiring an identity card image and carrying out image processing on the identity card image to obtain image information;
the image recognition module is used for recognizing the image information based on the training model to obtain identity card information and coding the identity card information;
and the information import module is used for generating an XML file and importing the coded identity card information into the XML file.
9. An identity card information importing device is characterized by further comprising:
at least one processor;
at least one memory for storing at least one program;
when executed by the at least one processor, cause the at least one processor to implement an identity card information import method as claimed in any one of claims 1 to 7.
10. A storage medium having stored therein instructions executable by a processor, the storage medium comprising: the processor-executable instructions, when executed by a processor, are for implementing an identity card information import method as claimed in any one of claims 1 to 7.
CN202010035413.9A 2020-01-14 2020-01-14 Identity card information importing method, system, device and storage medium Pending CN111275047A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010035413.9A CN111275047A (en) 2020-01-14 2020-01-14 Identity card information importing method, system, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010035413.9A CN111275047A (en) 2020-01-14 2020-01-14 Identity card information importing method, system, device and storage medium

Publications (1)

Publication Number Publication Date
CN111275047A true CN111275047A (en) 2020-06-12

Family

ID=71002989

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010035413.9A Pending CN111275047A (en) 2020-01-14 2020-01-14 Identity card information importing method, system, device and storage medium

Country Status (1)

Country Link
CN (1) CN111275047A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106778748A (en) * 2016-12-30 2017-05-31 江西憶源多媒体科技有限公司 Identity card method for quickly identifying and its device based on artificial neural network
CN110414523A (en) * 2019-07-22 2019-11-05 彩讯科技股份有限公司 A kind of identity card recognition method, device, equipment and storage medium
CN110443184A (en) * 2019-07-31 2019-11-12 上海海事大学 ID card information extracting method, device and computer storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106778748A (en) * 2016-12-30 2017-05-31 江西憶源多媒体科技有限公司 Identity card method for quickly identifying and its device based on artificial neural network
CN110414523A (en) * 2019-07-22 2019-11-05 彩讯科技股份有限公司 A kind of identity card recognition method, device, equipment and storage medium
CN110443184A (en) * 2019-07-31 2019-11-12 上海海事大学 ID card information extracting method, device and computer storage medium

Similar Documents

Publication Publication Date Title
CN108090511B (en) Image classification method and device, electronic equipment and readable storage medium
US11151402B2 (en) Method of character recognition in written document
WO2019223068A1 (en) Iris image local enhancement method, device, equipment and storage medium
CN101697196A (en) Digital identification system and method for serial numbers of name plate of camera
CN110969154A (en) Text recognition method and device, computer equipment and storage medium
CN105678301B (en) method, system and device for automatically identifying and segmenting text image
CN115131714A (en) Intelligent detection and analysis method and system for video image
CN109741273A (en) A kind of mobile phone photograph low-quality images automatically process and methods of marking
CN110929562A (en) Answer sheet identification method based on improved Hough transformation
CN106682670B (en) Station caption identification method and system
CN110991434B (en) Self-service terminal certificate identification method and device
CN110942067A (en) Text recognition method and device, computer equipment and storage medium
CN113920520A (en) Image text recognition method, system, storage medium and electronic equipment
CN114663726A (en) Training method of target type detection model, target detection method and electronic equipment
KR20200092492A (en) Method and Apparatus for Image Adjustment Based on Semantics-Aware
CN111507181B (en) Correction method and device for bill image and computer equipment
CN110135274B (en) Face recognition-based people flow statistics method
CN112749696A (en) Text detection method and device
CN117095417A (en) Screen shot form image text recognition method, device, equipment and storage medium
CN111950562A (en) Picture processing method and device, terminal equipment and storage medium
CN111275047A (en) Identity card information importing method, system, device and storage medium
CN111414889A (en) Financial statement identification method and device based on character identification
CN110956133A (en) Training method of single character text normalization model, text recognition method and device
CN111242121B (en) Antithetical couplet intelligent sorting method based on SVM and storage medium
CN113486788A (en) Video similarity determination method and device, electronic equipment and 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