CN108346132B - Certificate imaging method and device, camera device and certificate imaging system - Google Patents

Certificate imaging method and device, camera device and certificate imaging system Download PDF

Info

Publication number
CN108346132B
CN108346132B CN201810100812.1A CN201810100812A CN108346132B CN 108346132 B CN108346132 B CN 108346132B CN 201810100812 A CN201810100812 A CN 201810100812A CN 108346132 B CN108346132 B CN 108346132B
Authority
CN
China
Prior art keywords
image
certificate
images
equal
gray
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.)
Active
Application number
CN201810100812.1A
Other languages
Chinese (zh)
Other versions
CN108346132A (en
Inventor
张青峰
胡伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Subpixel Technology Co ltd
Original Assignee
Shenzhen Dotutech 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 Dotutech Co ltd filed Critical Shenzhen Dotutech Co ltd
Priority to CN201810100812.1A priority Critical patent/CN108346132B/en
Publication of CN108346132A publication Critical patent/CN108346132A/en
Application granted granted Critical
Publication of CN108346132B publication Critical patent/CN108346132B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4038Scaling the whole image or part thereof for image mosaicing, i.e. plane images composed of plane sub-images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Abstract

The invention discloses a certificate imaging method, a certificate imaging device, a camera device and a certificate imaging system, wherein the method comprises the following steps: acquiring images of the certificate under different illumination angles; equally dividing each certificate image into N equal parts, wherein the image with the gray value difference value of any adjacent pixel point in each equal part being smaller than or equal to a first gray threshold value is used as the equally divided image to be selected; respectively selecting the image to be selected with the maximum average gray value from the images to be selected which are equally divided from different certificate images to obtain N equally divided images to be spliced; the technical scheme of the invention can eliminate or reduce the strong light image which is supposed to belong to the hidden pattern but actually reflects light and is imaged on the recognizable information picture, thereby improving the success rate of character recognition and ensuring the integrity of the image.

Description

Certificate imaging method and device, camera device and certificate imaging system
Technical Field
The present invention relates to image processing technologies, and in particular, to a certificate imaging method and apparatus, a camera apparatus, and a certificate imaging system.
Background
The certificate reader is provided with Optical Character Recognition (OCR), and can automatically read the readable character information on the certificate by an imaging method; the Radio Frequency Identification (RFID) technology reads the chip information carried by the certificate; the magnetic card swiping identification technology is gradually eliminated due to the problems of magnetic flux leakage and the like. With the development and maturity of certificate reading technology in recent years, an e-gate system for self-service clearance and verification is gradually used in frontier inspection and customs and large public places such as airports, railway stations, hotels and the like, which need to check and verify certificates of certificate holders.
With the change of printing and materials, optical characters not only comprise non-hidden numbers, letters, symbols, photos and the like which are visible under natural light, but also comprise numbers, letters, patterns and the like which have strong concealment and can be shot under special near infrared or ultraviolet light illumination, in particular to some patterns with multi-layer anti-counterfeiting function, the patterns cover visible information, and the invisible patterns which are hidden become visible or can be shot in a certain angle and a certain direction; some patterned materials also have strong light reflecting properties at certain specific angles. The optical character recognition technology is an imaging technology combining the respective illumination of visible light, near infrared and ultraviolet light sources, and is a main technology for certificate recognition. However, some documents are illuminated by a light source, such as visible light or near infrared light, because of the illumination angle or direction, the concealed pattern generates a certain strong light reflection effect, the image appears on the visible light color image or the near infrared black and white image, if the light reflection image appears on the recognizable OCR information, the recognizable information is inevitably hidden, and the interference and the error of information recognition are caused.
Disclosure of Invention
The embodiment of the invention provides a certificate imaging method, a certificate imaging device, a camera device and a certificate imaging system, which are used for eliminating or reducing a strong light image which is supposed to belong to a hidden pattern but actually reflects light and is imaged on an identifiable information picture, so that the success rate of character identification is improved, and the integrity of the image is ensured.
In a first aspect, an embodiment of the present invention provides a method for imaging a document, including:
acquiring images of the certificate under different illumination angles;
equally dividing each certificate image into N equal parts, wherein the image with the gray value difference value of any adjacent pixel point in each equal part being smaller than or equal to a first gray threshold value is used as the equally divided image to be selected;
respectively selecting the image to be selected with the maximum average gray value from the images to be selected which are equally divided from different certificate images to obtain N equally divided images to be spliced;
and splicing the images to be spliced according to the sequence to obtain the target certificate image.
Further, equally dividing each certificate image into N equal parts, wherein the image with the gray value difference value of any adjacent pixel point in each equal part being smaller than or equal to the first gray threshold value comprises, as the to-be-selected image of the equal part:
equally dividing each certificate image into N equal parts, and giving up the image with the preset number of adjacent pixel points in each equal part, wherein the gray value of the adjacent pixel points is larger than a second gray threshold value;
taking the image of which the gray value difference value of any adjacent pixel point in the residual equal division is smaller than or equal to a first gray threshold value as the to-be-selected image of the equal division; wherein the first gray threshold is less than the second gray threshold.
In a second aspect, embodiments of the present invention also provide a document imaging apparatus, the apparatus comprising:
the acquisition module is used for acquiring images of the certificate under different illumination angles;
the dividing module is used for dividing each certificate image into N equal parts, and the image with the gray value difference value of any adjacent pixel point in each equal part being smaller than or equal to a first gray threshold value is used as the equally divided image to be selected;
the selecting module is used for respectively selecting the image to be selected with the maximum average gray value from the images to be selected which are the same and equally divided in different certificate images to obtain N equally divided images to be spliced;
and the splicing module is used for splicing the images to be spliced in sequence to obtain a target certificate image.
Further, the selecting module is specifically configured to:
equally dividing each certificate image into N equal parts, and giving up the image with the preset number of adjacent pixel points in each equal part, wherein the gray value of the adjacent pixel points is larger than a second gray threshold value;
taking the image of which the gray value difference value of any adjacent pixel point in the residual equal division is smaller than or equal to a first gray threshold value as the to-be-selected image of the equal division; wherein the first gray threshold is less than the second gray threshold.
In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the credential imaging method according to any one of the embodiments of the present invention.
In a fourth aspect, embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements a method of imaging a document as described in any of the embodiments of the present invention.
In a fifth aspect, an embodiment of the present invention further provides a camera apparatus, where the camera apparatus includes: the certificate imaging device comprises an image acquisition module and the certificate imaging device; the image acquisition module is used for acquiring images of the certificate under different illumination angles and then sending the images to the certificate imaging device.
In a sixth aspect, an embodiment of the present invention further provides a document imaging system, including: the certificate carrier, the illuminating lamp panel, the rotating mechanism, the reflector and the camera device are arranged on the certificate carrier;
the certificate carrier is positioned on the upper surface of the certificate imaging device and used for placing a certificate;
the illuminating lamp panel is positioned below the certificate carrier and on the side away from the certificate and is used for illuminating the certificate;
the rotating mechanism is connected with the illuminating lamp panel and is used for driving the illuminating lamp panel to swing at a preset angle from left to right;
the reflecting mirror is positioned on one side, deviating from the certificate, below the certificate carrier and used for reflecting the image to the camera device.
Furthermore, the illumination lamp plate is two strip-shaped lamp plates.
Further, the certificate carrier is optical glass or transparent plastic.
Further, the rotating mechanism swings inwards by an angle alpha and swings outwards by an angle beta;
Figure BDA0001566269110000041
wherein L is the distance between the center of the rotating mechanism and the certificate carrier, and W is the width of the certificate carrier.
The embodiment of the invention acquires the images of the certificate under different illumination angles; equally dividing each certificate image into N equal parts, wherein the image with the gray value difference value of any adjacent pixel point in each equal part being smaller than or equal to a first gray threshold value is used as the equally divided image to be selected; respectively selecting the image to be selected with the maximum average gray value from the images to be selected which are equally divided from different certificate images to obtain N equally divided images to be spliced; the images to be spliced are spliced in sequence to obtain the target certificate image, so that the highlight image which is supposed to belong to the hidden pattern but actually reflected and imaged on the recognizable information image can be eliminated or lightened, the success rate of character recognition is improved, and the integrity of the image is ensured.
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 embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1A is a flow chart of a method of imaging a document in accordance with one embodiment of the invention;
FIG. 1B is a schematic diagram of an image to be stitched according to a first embodiment of the present invention;
FIG. 1C is a schematic diagram of a credential imaging system in a sixth embodiment of the invention;
FIG. 1D is a schematic view of another credential imaging system in a sixth embodiment of the invention;
FIG. 2 is a schematic view of a document imaging apparatus according to a second embodiment of the invention;
FIG. 3 is a schematic structural diagram of a computer device according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a camera device according to a fourth embodiment of the present invention;
FIG. 5 is a schematic view of a credential imaging system in a sixth embodiment of the invention;
fig. 6 is a schematic view of the swing of a rotating mechanism according to a sixth embodiment of the present invention;
fig. 7 is a schematic view of a swing angle of a rotating mechanism according to a sixth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Example one
Fig. 1A is a flowchart of a credential imaging method in a first embodiment of the present invention, where this embodiment is applicable to a credential imaging situation, and the method can be executed by a credential imaging device in an embodiment of the present invention, where the device can be implemented by software and/or hardware, as shown in fig. 1A, the method specifically includes the following steps:
and S110, acquiring images of the certificate under different illumination angles.
Wherein, different illumination angles are generated due to the change of the position of the illuminating lamp.
Specifically, gather the image of certificate when the light is in different angles through the image acquisition module in advance, for example can be, if the light is in angle A, then acquire the image of certificate when the light is in angle A, if the light is in angle B, then acquire the image of certificate when the light is in angle B.
Specifically, the frequency of the position change of the illuminating lamp can be set according to an empirical value, and can also be set by a user.
Specifically, the frequency of the image acquisition module for acquiring the image may be set according to experience or may be set by a user, and the frequency of the image acquisition module for acquiring the image is related to the frequency of the position change of the illumination lamp. For example, the faster the position of the illumination lamp is changed, the faster the image acquisition module acquires images.
Specifically, the mode of acquiring the images of the certificates acquired by the image acquisition module under different illumination angles may be to acquire the images acquired by the image acquisition module in real time, or to acquire the images acquired by the image acquisition module after the image acquisition module acquires a preset number of certificate images.
And S120, equally dividing each certificate image into N equal parts, wherein the image with the gray value difference value of any adjacent pixel point in each equal part being smaller than or equal to the first gray threshold value is taken as the equally divided image to be selected.
Wherein, the N may be set according to an empirical value, or may be set by a user.
The first gray threshold may be set according to an empirical value, or may be set by a user. Specifically, the comparison between the gray value difference of any adjacent pixel point and the first gray threshold is performed to determine whether the gray value of any adjacent pixel point in each equal division changes suddenly.
Specifically, each certificate image in a plurality of acquired certificate images is equally divided into N equal parts, an image with the gray value difference value of any adjacent pixel point in the equally divided images being less than or equal to a first gray threshold value is screened out as an equally divided image to be selected, for example, the image acquisition module acquires 8 certificate images, 4-equally divides each certificate image in the 8 certificate images (A, B, C and D), calculates a gray value difference value of any adjacent pixel point in an A-equally-divided image of each certificate image in the 8 certificate images, judges whether the gray value difference value of any adjacent pixel point is smaller than or equal to an image of a first gray threshold, and if there is an image of which the gray value difference value of any adjacent pixel point in the A-equally-divided image of the 4 certificate images is smaller than or equal to the first gray threshold, takes the A-equally-divided image of the 4 certificate images as a candidate image of the A-equally-divided image.
S130, respectively selecting the image to be selected with the maximum average gray value from the images to be selected with the same equal division of different certificate images to obtain N equal division images to be spliced.
Wherein, the different certificate images refer to the certificate images collected by the image collecting module.
Specifically, the image to be selected with the largest average gray value in the same equally-divided images to be selected is selected from the images to be selected as the image to be spliced which is equally divided by N.
Specifically, the mode of determining the images to be stitched may be to sequentially determine the images to be stitched which are equally divided from 1 st to N th; or the average gray value can be calculated in advance, then the gray values of the average pixel points of the equally divided images at the same position are compared respectively, and finally the image to be selected with the maximum average gray value is used as the image to be spliced. For example, if the a-division image of the first image is the a-division image candidate image, the a-division image of the third image is the a-division image candidate image, and the a-division image of the fourth image is the a-division image candidate image, selecting an image with the maximum average gray value from the 3 a-division images as the a-division image to be stitched; if the B equally divided image of the second image is a B equally divided image candidate image, the B equally divided image of the third image is a B equally divided image candidate image, and the B equally divided image of the fourth image is a B equally divided image candidate image, selecting an image with the maximum average gray value in the 3B equally divided images from the 3B equally divided images as a B equally divided image to be spliced; and by analogy, the C equal-division image to be spliced and the D equal-division image to be spliced are gradually obtained.
And S140, splicing the images to be spliced in sequence to obtain the target certificate image.
And splicing the images to be spliced according to the sequence, namely splicing the images to be spliced according to the position sequence.
Specifically, the images to be spliced are spliced according to the position sequence to obtain the target certificate image. For example, as shown in fig. 1B, if the images to be stitched include an image a to be stitched, an image B to be stitched, an image C to be stitched, and an image D to be stitched, and the position sequence of the images to be stitched is that the image a to be stitched is on the left side of the whole image, the image B to be stitched is on the right side of the image a to be stitched, the image C to be stitched is on the right side of the image B to be stitched, and the image D to be stitched is on the right side of the image C to be stitched, that is, the image D to be stitched is on the right side of the whole image. And splicing the spliced images according to the sequence to obtain the certificate image.
Optionally, equally dividing each certificate image into N equal parts, wherein the image with the gray value difference value of any adjacent pixel point in each equal part being smaller than or equal to the first gray threshold value includes, as the to-be-selected image of the equal part:
equally dividing each certificate image into N equal parts, and giving up the image with the preset number of adjacent pixel points in each equal part, wherein the gray value of the adjacent pixel points is larger than a second gray threshold value; taking the image of which the gray value difference value of any adjacent pixel point in the residual equal division is smaller than or equal to a first gray threshold value as the to-be-selected image of the equal division; wherein the first gray threshold is less than the second gray threshold.
The second gray level threshold may be set according to an empirical value, or may be set by a user. Specifically, the second gray level threshold may be 235.
The preset number may be set according to an empirical value, or may be set by a user.
Specifically, whether abnormal bright spots exist in the equal divisions is determined according to the image which judges whether the gray value of the preset number of adjacent pixel points in each equal division is larger than the second gray threshold value.
It should be noted that, the division with abnormal bright spots can be eliminated by judging whether the gray value of the preset number of adjacent pixel points in the division is greater than the second gray threshold value, and the remaining divided images are used as images to be selected; each equally divided image to be selected can also be determined by judging whether the gray value difference value of any adjacent pixel point is less than or equal to the first gray threshold value; or the division with the abnormal bright spots may be eliminated by determining whether the gray value of the preset number of adjacent pixel points in the division is greater than the second gray threshold, and then determining whether the difference value of the gray values of any adjacent pixel points in the remaining divided images is less than or equal to the first gray threshold, which is not limited in this embodiment of the present invention.
In a specific example, although the main general certificates of all countries in the world are manufactured according to internationally recognized protocols, the certificates are of the type of wuhua eight, and in the case of passports, the processes and technologies manufactured in all countries are different, and the adopted printing materials, inks, anti-counterfeiting technologies, anti-counterfeiting materials, printing patterns and the like are different. The certificate can slowly deform and wrinkle unevenly along with the use time; the material can slowly become old, and the conditions of dirt, abrasion point blocks and fading appear; the embedded squeeze film layer has the problems of air bubbles, mildew and the like due to the time problem. All these anomalies can cause the change of the light-reflecting properties of the document surface, thus locally creating on the document image patches or dots of anomalous light that interfere with the recognition. The method provided by the embodiment of the invention aims to solve the problems of local abnormal bright spots, lines and spots on the certificate photo. As shown in fig. 1C, the document is laid on a document carrier, which is typically an optical material with good light transmission, such as optical glass or transparent plastic, during document identification. The light for illumination irradiates on the identification page of the certificate to illuminate the page, the image information of the identification page of the certificate penetrates through the certificate carrier, the image is reflected to a camera system through a reflector below the carrier, the camera system collects the image information of the identification page of the certificate, and the complete image of the identification page of the certificate is obtained after the color, the contrast, the noise and the like of the image are processed.
The illuminating lamp panel in the embodiment of the invention is not fixed at a dead position, but hung on a rotating mechanism capable of swinging left and right. The rotating mechanism can drive the lighting lamp panel to swing at a certain positive and negative angle. The illumination lamp plate can be a long strip shape, and also can be arranged side by side in two or more small strips. In order to avoid that the illuminating lamp panel can shield imaging light when swinging at a large angle, as shown in fig. 1D, the embodiment of the invention preferably controls the swinging of the left and right strip-shaped illuminating lamp panels at opposite angles.
According to the technical scheme of the embodiment of the invention, the images of the certificate under different illumination angles are acquired; equally dividing each certificate image into N equal parts, wherein the image with the gray value difference value of any adjacent pixel point in each equal part being smaller than or equal to a first gray threshold value is used as the equally divided image to be selected; respectively selecting the image to be selected with the maximum average gray value from the images to be selected which are equally divided from different certificate images to obtain N equally divided images to be spliced; the images to be spliced are spliced in sequence to obtain the target certificate image, so that the highlight image which is supposed to belong to the hidden pattern but actually reflected and imaged on the recognizable information image can be eliminated or lightened, the success rate of character recognition is improved, and the integrity of the image is ensured.
Example two
Fig. 2 is a schematic structural diagram of a document imaging apparatus according to a second embodiment of the present invention. The embodiment can be applied to the case of certificate imaging, the device can be implemented in software and/or hardware, and the device can be integrated in any device for providing certificate imaging, as shown in fig. 2, where the certificate imaging device specifically includes: the system comprises an acquisition module 210, an averaging module 220, a selection module 230 and a splicing module 240.
The acquiring module 210 is configured to acquire images of a certificate under different illumination angles;
the dividing module 220 is configured to divide each certificate image equally into N equal parts, and an image in which a gray value difference value of any adjacent pixel point in each equal part is smaller than or equal to a first gray threshold is used as the equally divided image to be selected;
the selecting module 230 is configured to select, from the equally-divided images to be selected of different certificate images, the image to be selected with the largest average gray value to obtain N equally-divided images to be spliced;
and the splicing module 240 is configured to splice the images to be spliced in sequence to obtain a target certificate image.
Optionally, the selecting module 230 is specifically configured to:
equally dividing each certificate image into N equal parts, and giving up the image with the preset number of adjacent pixel points in each equal part, wherein the gray value of the adjacent pixel points is larger than a second gray threshold value;
taking the image of which the gray value difference value of any adjacent pixel point in the residual equal division is smaller than or equal to a first gray threshold value as the to-be-selected image of the equal division; wherein the first gray threshold is less than the second gray threshold.
According to the technical scheme of the embodiment of the invention, the images of the certificate under different illumination angles are acquired; equally dividing each certificate image into N equal parts, wherein the image with the gray value difference value of any adjacent pixel point in each equal part being smaller than or equal to a first gray threshold value is used as the equally divided image to be selected; respectively selecting the image to be selected with the maximum average gray value from the images to be selected which are equally divided from different certificate images to obtain N equally divided images to be spliced; the images to be spliced are spliced in sequence to obtain the target certificate image, so that the highlight image which is supposed to belong to the hidden pattern but actually reflected and imaged on the recognizable information image can be eliminated or lightened, the success rate of character recognition is improved, and the integrity of the image is ensured.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a computer device in a third embodiment of the present invention. FIG. 3 illustrates a block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention. The computer device 12 shown in FIG. 3 is only an example and should not impose any limitation on the scope of use or functionality of embodiments of the present invention.
As shown in FIG. 3, computer device 12 is in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 3, and commonly referred to as a "hard drive"). Although not shown in FIG. 3, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least two program products having a set (e.g., at least two) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least two) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with computer device 12, and/or with any devices (e.g., network card, modem, etc.) that enable computer device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. In the computer device 12 of the present embodiment, the display 24 is not provided as a separate body but is embedded in the mirror surface, and when the display surface of the display 24 is not displayed, the display surface of the display 24 and the mirror surface are visually integrated. Also, computer device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with the other modules of computer device 12 via bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the system memory 28, for example, implementing a credential imaging method provided by an embodiment of the present invention: acquiring images of the certificate under different illumination angles; equally dividing each certificate image into N equal parts, wherein the image with the gray value difference value of any adjacent pixel point in each equal part being smaller than or equal to a first gray threshold value is used as the equally divided image to be selected; respectively selecting the image to be selected with the maximum average gray value from the images to be selected which are equally divided from different certificate images to obtain N equally divided images to be spliced; and splicing the images to be spliced according to the sequence to obtain the target certificate image.
Example four
A fourth embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a certificate imaging method as provided in all embodiments of the present invention: acquiring images of the certificate under different illumination angles; equally dividing each certificate image into N equal parts, wherein the image with the gray value difference value of any adjacent pixel point in each equal part being smaller than or equal to a first gray threshold value is used as the equally divided image to be selected; respectively selecting the image to be selected with the maximum average gray value from the images to be selected which are equally divided from different certificate images to obtain N equally divided images to be spliced; and splicing the images to be spliced according to the sequence to obtain the target certificate image.
Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
EXAMPLE five
Fig. 4 is a schematic structural diagram of a camera device according to a fifth embodiment of the present invention. The embodiment is applicable to the case of certificate imaging, the device can be implemented in software and/or hardware, the device can be integrated in any device that provides a certificate imaging function, as shown in fig. 4, and the camera device specifically includes: an image capture module 410 and a credential imaging device 420 as described in example two.
The image acquisition module 410 is configured to acquire images of a certificate at different illumination angles and send the acquired images to the certificate imaging apparatus.
According to the technical scheme of the embodiment, images of the certificate under different illumination angles are acquired; equally dividing each certificate image into N equal parts, wherein the image with the gray value difference value of any adjacent pixel point in each equal part being smaller than or equal to a first gray threshold value is used as the equally divided image to be selected; respectively selecting the image to be selected with the maximum average gray value from the images to be selected which are equally divided from different certificate images to obtain N equally divided images to be spliced; the images to be spliced are spliced in sequence to obtain the target certificate image, so that the highlight image which is supposed to belong to the hidden pattern but actually reflected and imaged on the recognizable information image can be eliminated or lightened, the success rate of character recognition is improved, and the integrity of the image is ensured.
EXAMPLE six
Fig. 5 is a schematic structural diagram of a document imaging system according to a sixth embodiment of the invention. As shown in fig. 5, the credential imaging system specifically includes: credential carrier 510, illumination lamp panel 520, rotation mechanism 530, mirror 540, and camera device 550 as described in example five.
The certificate carrier is positioned on the upper surface of the certificate imaging device and used for placing a certificate;
the illuminating lamp panel is positioned below the certificate carrier and on the side away from the certificate and is used for illuminating the certificate;
the rotating mechanism is connected with the illuminating lamp panel and is used for driving the illuminating lamp panel to swing at a preset angle from left to right;
the reflecting mirror is positioned on one side, deviating from the certificate, below the certificate carrier and used for reflecting the image to the camera device.
Optionally, the illumination lamp plate is two strip-shaped lamp plates.
Optionally, the document carrier is optical glass or transparent plastic.
Specifically, as shown in fig. 6, the position relationship among the certificate carrier, the illumination lamp panel, the rotating mechanism, the reflector and the camera device is as shown in the figure, the swing of the preset angle at the left and right of the rotating mechanism drives the swing of the preset angle at the left and right of the illumination lamp panel, the camera device collects images of the certificate at different illumination angles, a target certificate image is finally obtained through processing the images of the certificate at different illumination angles, character recognition is performed by using the target certificate image, and the success rate is higher.
Optionally, the rotating mechanism swings inward by an angle α and swings outward by an angle β;
α=arc(tan(3W/4L));β=arc(tan(W/4L));
wherein L is the distance between the center of the rotating mechanism and the certificate carrier, and W is the width of the certificate carrier.
Specifically, when the certificate was gathered, the another side can be scanned from one side of certificate carrier to the principal ray that the light that throws light on the illumination lamp plate sent. The certificate carrier is equivalent to a collection window, and the swing angle of the illuminating lamp panel is related to the distance between the illuminating lamp panel and the collection window and the width of the collection window. As shown in fig. 7, the center of the rotation mechanism is at a vertical distance L from the document carrier on which the document is placed, and the width of the document carrier is W. Alpha is the lamp plate inward swing angle, beta is the lamp plate outward swing angle, and the total angle that single lamp plate needs the swing is (alpha + beta).
In one specific example, where the document is held stationary on the document carrier throughout the scanning process, the image capture module may capture a plurality of document page images in succession, for example n, and then divide each image lengthwise into n equal parts at fixed positions, given the names a11, a12 … … Ann for each image. The processing algorithm can scan the gray values of pixel points one by one for each part of each image, when the gray values of a certain number of adjacent pixels in the A11 image are greater than a certain value, for example, the gray values of 10 adjacent pixel points are greater than 235, it can be considered that there are abnormal bright spots in the image, the image part is abandoned, the image part is transferred to the A21 image block at the same position of the next image for scanning again, and according to the scan to An1, An image without abnormal bright spots and with the highest average gray value is selected from the image blocks in the n parts of the same position as the image Ai1 at the position; in the same way, the processing algorithm finds out an image without abnormal bright spots and with the maximum average gray scale value from the n images at each block position; thus obtaining n Aij images of each position, and splicing the n images into a complete certificate image without abnormal bright spots and with moderate brightness.
It should be noted that the number of the collected images can be adjusted according to practical experience, the more the images are collected on one document page, the higher the precision is, but the larger the data size is, the more the image data needs to be processed in portions, and the longer the processing time is, so that not only the experience of the client is affected, but also the computer and the processing software are relatively more relevant tests. Certainly, according to the optimization analysis, not to say that each position image is divided into n equal parts, each equal part needs to be scanned and analyzed, according to the direction rule of light scanning, the image which is needed beside the equal part image with abnormal bright spots and has a higher average gray level value is often needed, and the average gray level value which is farther away from the position is smaller, so that the positions can be preferentially selected to be scanned, the scanning number is reduced, and the processing time is optimized.
According to the technical scheme of the embodiment, images of the certificate under different illumination angles are acquired; equally dividing each certificate image into N equal parts, wherein the image with the gray value difference value of any adjacent pixel point in each equal part being smaller than or equal to a first gray threshold value is used as the equally divided image to be selected; respectively selecting the image to be selected with the maximum average gray value from the images to be selected which are equally divided from different certificate images to obtain N equally divided images to be spliced; the images to be spliced are spliced in sequence to obtain the target certificate image, so that the highlight image which is supposed to belong to the hidden pattern but actually reflected and imaged on the recognizable information image can be eliminated or lightened, the success rate of character recognition is improved, and the integrity of the image is ensured.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments illustrated herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method of imaging a document, comprising:
acquiring images of the certificate under different illumination angles;
equally dividing each certificate image into N equal parts, wherein the image with the gray value difference value of any adjacent pixel point in each equal part being smaller than or equal to a first gray threshold value is used as the equally divided image to be selected;
respectively selecting the image to be selected with the maximum average gray value from the images to be selected which are equally divided from different certificate images to obtain N equally divided images to be spliced;
and splicing the images to be spliced according to the sequence to obtain the target certificate image.
2. The method of claim 1, wherein the step of equally dividing each document image into N equal parts, wherein the step of dividing the image into equal parts, which is the image with the gray value difference of any adjacent pixel point in each equal part being smaller than or equal to the first gray threshold value, comprises the step of:
equally dividing each certificate image into N equal parts, and giving up the image with the preset number of adjacent pixel points in each equal part, wherein the gray value of the adjacent pixel points is larger than a second gray threshold value;
taking the image of which the gray value difference value of any adjacent pixel point in the residual equal division is smaller than or equal to a first gray threshold value as the to-be-selected image of the equal division; wherein the first gray threshold is less than the second gray threshold.
3. A credential imaging device comprising:
the acquisition module is used for acquiring images of the certificate under different illumination angles;
the dividing module is used for dividing each certificate image into N equal parts, and the image with the gray value difference value of any adjacent pixel point in each equal part being smaller than or equal to a first gray threshold value is used as the equally divided image to be selected;
the selecting module is used for respectively selecting the image to be selected with the maximum average gray value from the images to be selected which are the same and equally divided in different certificate images to obtain N equally divided images to be spliced;
and the splicing module is used for splicing the images to be spliced in sequence to obtain a target certificate image.
4. The apparatus of claim 3, wherein the selection module is specifically configured to:
equally dividing each certificate image into N equal parts, and giving up the image with the preset number of adjacent pixel points in each equal part, wherein the gray value of the adjacent pixel points is larger than a second gray threshold value;
taking the image of which the gray value difference value of any adjacent pixel point in the residual equal division is smaller than or equal to a first gray threshold value as the to-be-selected image of the equal division; wherein the first gray threshold is less than the second gray threshold.
5. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method as claimed in claim 1 or 2 when executing the program.
6. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method as claimed in claim 1 or 2.
7. A camera apparatus, comprising: an image capture module and the credential imaging device as in claim 3 or 4; the image acquisition module is used for acquiring images of the certificate under different illumination angles and then sending the images to the certificate imaging device.
8. A credential imaging system comprising: a document carrier, an illumination light panel, a rotation mechanism, a mirror, and the camera device of claim 7;
the certificate carrier is positioned on the upper surface of the certificate imaging device and used for placing a certificate;
the illuminating lamp panel is positioned below the certificate carrier and on the side away from the certificate and is used for illuminating the certificate;
the rotating mechanism is connected with the illuminating lamp panel and is used for driving the illuminating lamp panel to swing at a preset angle from left to right;
the reflecting mirror is positioned on one side, deviating from the certificate, below the certificate carrier and used for reflecting the image to the camera device.
9. The system of claim 8, wherein the document carrier is optical glass or transparent plastic.
10. The system of claim 8, wherein the rotation mechanism swings inward an angle a and outward a angle β;
Figure FDA0001566269100000031
wherein L is the distance between the center of the rotating mechanism and the certificate carrier, and W is the width of the certificate carrier.
CN201810100812.1A 2018-02-01 2018-02-01 Certificate imaging method and device, camera device and certificate imaging system Active CN108346132B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810100812.1A CN108346132B (en) 2018-02-01 2018-02-01 Certificate imaging method and device, camera device and certificate imaging system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810100812.1A CN108346132B (en) 2018-02-01 2018-02-01 Certificate imaging method and device, camera device and certificate imaging system

Publications (2)

Publication Number Publication Date
CN108346132A CN108346132A (en) 2018-07-31
CN108346132B true CN108346132B (en) 2021-04-20

Family

ID=62959857

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810100812.1A Active CN108346132B (en) 2018-02-01 2018-02-01 Certificate imaging method and device, camera device and certificate imaging system

Country Status (1)

Country Link
CN (1) CN108346132B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109740586B (en) * 2018-12-19 2022-08-16 南京华科和鼎信息科技有限公司 Automatic reading system and method for anti-dazzle certificate
CN109618100B (en) * 2019-01-15 2020-11-27 北京旷视科技有限公司 Method, device and system for judging field shooting image

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101625760A (en) * 2009-07-28 2010-01-13 谭洪舟 Method for correcting certificate image inclination
CN101662581A (en) * 2009-09-09 2010-03-03 谭洪舟 Multifunctional certificate information collection system
CN102156853A (en) * 2010-02-11 2011-08-17 深圳鼎识科技有限公司 Certificate reading system and certificate reading method
CN103198313A (en) * 2013-04-11 2013-07-10 上海慧升智能科技有限公司 OCR character checking device of smart card manufacturing device
CN107153834A (en) * 2017-04-14 2017-09-12 张岩 Image recognition hot spot processing method and processing device
CN107341839A (en) * 2017-07-07 2017-11-10 成都东软学院 A kind of certificate image processing method, device and equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8831329B1 (en) * 2013-06-28 2014-09-09 Google Inc. Extracting card data with card models

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101625760A (en) * 2009-07-28 2010-01-13 谭洪舟 Method for correcting certificate image inclination
CN101662581A (en) * 2009-09-09 2010-03-03 谭洪舟 Multifunctional certificate information collection system
CN102156853A (en) * 2010-02-11 2011-08-17 深圳鼎识科技有限公司 Certificate reading system and certificate reading method
CN103198313A (en) * 2013-04-11 2013-07-10 上海慧升智能科技有限公司 OCR character checking device of smart card manufacturing device
CN107153834A (en) * 2017-04-14 2017-09-12 张岩 Image recognition hot spot processing method and processing device
CN107341839A (en) * 2017-07-07 2017-11-10 成都东软学院 A kind of certificate image processing method, device and equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于双光源图像合成法的标牌字符识别方法研究;林笃盛等;《工业控制计算机》;20140925;全文 *

Also Published As

Publication number Publication date
CN108346132A (en) 2018-07-31

Similar Documents

Publication Publication Date Title
US10255709B2 (en) System and method for creating a virtual backdrop
TW569153B (en) Method and apparatus for three-dimensional shadow lightening
US9430080B2 (en) Touch positioning method, touch screen, touch system, and display
US5175593A (en) Fingerprint photographing system
CN1208486A (en) Boundary mapping system and method
CN103295006A (en) High-performance detonator coded image recognition device
CN112102402B (en) Flash light spot position identification method and device, electronic equipment and storage medium
CN108346132B (en) Certificate imaging method and device, camera device and certificate imaging system
RU2661760C1 (en) Multiple chamber using for implementation of optical character recognition
WO2009094446A1 (en) Method and apparatus for cropping images
CN109738450A (en) The detection method and device of keyboard of notebook computer
JP2017090194A (en) Inspection system and inspection method
US6157373A (en) Method and apparatus for displaying images
US20100111439A1 (en) Noise Reduction For Digital Images
CN106557733B (en) Information processing unit and information processing method
KR101842535B1 (en) Method for the optical detection of symbols
EP3165018A2 (en) System and method for quantifying reflection e.g. when analyzing laminated documents
US20200193107A1 (en) Bar-code reader with specular reflection immunity
CN102132239B (en) Interactive display screen
CN114359160A (en) Screen detection method and device, electronic equipment and storage medium
JP2002032752A (en) Method for automatically detecting bright window
US9635204B2 (en) Partial information capture and processing
JPH11316179A (en) Method and device for testing crushing of glass plate image pickup method for glass test, and image signal processing method used the method
JP2007249743A (en) Identification method for moving object, identification device for moving object and program making identification processing for moving object to be performed
CN110441315A (en) Electronic component test equipment and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221202

Address after: 518000 No.212, block r3-b, Gaoxin industrial village, No.018, Gaoxin South 7th Road, high tech Zone community, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Patentee after: Shenzhen Subpixel Technology Co.,Ltd.

Address before: 518000 14e, building 1a, Shenzhen software industry base, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Patentee before: SHENZHEN DOTUTECH Co.,Ltd.