CN112270305A - Card image recognition method and device and electronic equipment - Google Patents

Card image recognition method and device and electronic equipment Download PDF

Info

Publication number
CN112270305A
CN112270305A CN202011289940.9A CN202011289940A CN112270305A CN 112270305 A CN112270305 A CN 112270305A CN 202011289940 A CN202011289940 A CN 202011289940A CN 112270305 A CN112270305 A CN 112270305A
Authority
CN
China
Prior art keywords
card
image
information
original image
card image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011289940.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.)
Beijing Youzhuju Network Technology Co Ltd
Original Assignee
Beijing Youzhuju Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Youzhuju Network Technology Co Ltd filed Critical Beijing Youzhuju Network Technology Co Ltd
Priority to CN202011289940.9A priority Critical patent/CN112270305A/en
Publication of CN112270305A publication Critical patent/CN112270305A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks

Abstract

The embodiment of the disclosure discloses a card image identification method and device and electronic equipment. One embodiment of the method comprises: acquiring an original image comprising a card image, wherein the position and/or the direction of the card image in the original image are arbitrary; and identifying card information indicated by the card image from the original image. Therefore, a new card image recognition mode can be provided.

Description

Card image recognition method and device and electronic equipment
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a card image recognition method, an apparatus, and an electronic device.
Background
With the development of the internet, users increasingly use terminal devices to realize various functions.
For example, the user can input card information on the physical card through the terminal device to perform functions such as payment or verification. The user means to input card information may be inefficient, or may cause information input errors due to user error.
Disclosure of Invention
This disclosure is provided to introduce concepts in a simplified form that are further described below in the detailed description. This disclosure is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, an embodiment of the present disclosure provides a card image identification method, including: acquiring an original image comprising a card image, wherein the position and/or the direction of the card image in the original image are arbitrary; and identifying card information indicated by the card image from the original image.
In a second aspect, an embodiment of the present disclosure provides a card image recognition apparatus, including: the card reading device comprises an acquisition unit, a reading unit and a processing unit, wherein the acquisition unit is used for acquiring an original image comprising a card image, and the position and/or the direction of the card image in the original image are arbitrary; and the identification unit is used for identifying the card information indicated by the card image from the original image.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the card image recognition method according to the first aspect.
In a fourth aspect, the disclosed embodiments provide a computer readable medium, on which a computer program is stored, which when executed by a processor, implements the steps of the card image recognition method according to the first aspect.
According to the card image identification method, the card image identification device and the electronic equipment, the original image comprising the card image is obtained, and the position and/or the direction of the card image in the original image are/is arbitrary; then, from the original image, the card information indicated by the card image is identified. Therefore, the requirement of the original image serving as the basis of image recognition can be reduced, the universality of the image recognition method is improved, and the difficulty of obtaining card information by adopting card image recognition is reduced. Furthermore, the difficulty of inputting card information through card image recognition by a user can be reduced, and the operation efficiency of inputting the card information by using the terminal by the user is improved.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is a flow diagram of one embodiment of a card image recognition method according to the present disclosure;
FIG. 2 is a schematic diagram of one application scenario of a card image recognition method according to the present disclosure;
FIG. 3 is a schematic diagram of one application scenario of a card image recognition method according to the present disclosure;
FIG. 4 is a flow diagram of one implementation of a card image recognition method according to the present disclosure;
FIG. 5 is a schematic structural diagram of one embodiment of a card image recognition device according to the present disclosure;
FIG. 6 is an exemplary system architecture to which the card image recognition method of one embodiment of the present disclosure may be applied;
fig. 7 is a schematic diagram of a basic structure of an electronic device provided according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Referring to fig. 1, a flow of one embodiment of a card image recognition method according to the present disclosure is shown. The card image recognition method is applied to the terminal equipment and/or the server. The card image recognition method as shown in fig. 1 includes the following steps:
in step 101, an original image including an image of a card is acquired.
In this embodiment, the original image may be acquired by acquiring the original image in real time, or acquiring an original image acquired in advance.
In this embodiment, the card image may indicate a card, and the card may be a carrier carrying information. The size of the card is generally the standard size set by the industry or related institutions.
As an example, the card may include, but is not limited to, at least one of: bank cards, membership cards, transportation cards, tickets, etc.
By way of example, the information carried by the card may include, but is not limited to, at least one of: card number, card issuing agency name, card owner name.
In some embodiments, the card corresponding to the card image is in any one of the following shapes: rectangular, circular, oval, triangular. That is, the shape of the card to which the present embodiment can be applied is not limited.
In this embodiment, the position and/or orientation of the card image in the original image is arbitrary.
In this embodiment, the position of the card image in the original image may be arbitrary. The orientation of the card image in the original image may also be arbitrary. Alternatively, the direction or position of the card image in the original image is arbitrary.
In other words, the original image that is the basis of the card information identification is not limited. I.e. without defining the position or orientation of the card image in the original image.
In some embodiments of the present application, the timing for acquiring the original image is not limited.
As an example, at the payment interface described above, an image upload control may be provided. And triggering an image uploading control by a user, and opening the local photo album by the terminal equipment to allow the user to select the original image comprising the card image from the local photo album. The mode of selecting the original image stored in the album does not set the information of the guide frame and the like for the card image acquired during shooting.
Step 102, identifying card information indicated by the card image from the original image.
Here, the card information of the card image may be identified from the original image.
Here, the card information of the card image may include, but is not limited to, one of: numbers, letters, etc. The meaning of the above numbers or letters may vary according to the type of the card, and is not limited herein.
It should be noted that the execution subject of step 102 may be a terminal device, or may be a server, and further includes the terminal device and the server (i.e., the terminal device and the server are jointly executed).
Here, the card information indicated by the card image may be recognized from the original image in various ways.
As an example, the position of the card image in the original image can be determined by image processing means of expansion and erosion; and then, the card image is rotated once every preset angle (for example, 1 degree) to obtain an image, and the image is used as a recognition basis to perform image recognition.
As an example, the entire original image may be subjected to image recognition, and the recognition result may be used as card image information.
In this embodiment, the process of identifying the card image to obtain the card information may be set according to an actual application scenario, which is not limited herein.
In some embodiments, the card image may be identified by using an image identification model common to each scene, so as to obtain card information.
In some related arts, in an original image used as a basis for image recognition, the position and the orientation of the card image are relatively fixed, for example, set in the middle of the original image, and the orientation is a positive direction. When the original image with the relatively fixed card position is acquired, the acquisition can be completed by spending a long time for a user.
It should be noted that, in the card image recognition method shown in this embodiment, an original image including a card image is obtained, and a position and/or a direction of the card image in the original image are arbitrary; then, from the original image, the card information indicated by the card image is identified. Therefore, the requirement of the original image serving as the basis of image recognition can be reduced, the universality of the image recognition method is improved, and the difficulty of obtaining card information by adopting card image recognition is reduced. Furthermore, the difficulty of inputting card information through card image recognition by a user can be reduced, and the operation efficiency of inputting the card information by using the terminal by the user is improved.
In some embodiments, the step 101 may include: and acquiring an original image based on the image acquisition preview interface.
Here, the position and/or orientation of the card image in the image capture preview interface is arbitrary.
In some application scenarios, the image capture preview interface may be displayed on a terminal device. The user of the terminal equipment can acquire and obtain an original image comprising the card image by referring to the image acquisition preview interface.
Here, the direction and/or position of the card image in the image capturing interface may be arbitrary.
It is understood that at the moment of the image capture confirmation operation (which may be colloquially referred to as pressing the shutter), the terminal may take the image displayed in the image capture preview interface as the final captured original image. The position and/or orientation of the card image in the image capture preview interface at the time the original image is captured may be arbitrary.
In some application scenarios, the image capture preview interface described above may be presented in response to a user triggering a card image capture control.
As an example, at the payment interface, a card image capture control may be provided. The user triggers the card image acquisition control, and the terminal equipment can lift the image acquisition function and display an image acquisition preview interface. In the image acquisition preview interface, guidance is not required for the position and the direction of the card image.
In some related art, the image capture preview interface displays a guide frame for guiding a user to align the card image within the guide frame prior to image capture.
Referring to fig. 2 and 3, fig. 2 and 3 show application scenarios of the embodiment corresponding to fig. 1.
In fig. 2 or fig. 3, the interface displayed on the terminal screen may be an image capture preview interface. In the image capture preview interface, a card image 201 may be presented. In the card image 201, card information "three by three" and "123456789" may be described. The user, if pressing the capture control 202, may control capturing the original image, which may be the image presented in the image capture preview interface.
The position and direction of the card image in the image capture preview interface may not be limited. Specifically, the card image in fig. 2 is located at the upper left of the interface, and the direction of the card image is positive. In fig. 3, the card image is located at the lower right portion of the image capture interface, and the direction of the card image is inclined. In contrast, in the related art in the field of card image recognition, a guide frame is generally set in an image capture preview interface to guide a user to align a card image to the guide frame before image capture.
The method includes the steps that an original image including a card image is acquired based on an image acquisition preview interface, and the position and/or the direction of the card image in the image acquisition preview interface are/is arbitrary; then, from the original image, the card information indicated by the card image is identified. Therefore, when the user collects the card image, the user can collect the card image in any mode (without aiming at the position or the direction of the card image deliberately), so that the time consumed by the user when collecting the card image can be saved, the image collection efficiency is improved, and the image recognition speed is increased.
In some embodiments, referring to fig. 4, the step 102 may include steps 1021 and 1022.
Step 1021, card position information and card direction information are determined.
Here, the card position information indicates a position of the card image in the original image. The card orientation information indicates an orientation of the card image in the original image.
Here, the representation manner of the card position information may be set according to an actual application scenario, and is not limited herein. Similarly, the representation mode of the card direction information may also be set according to an actual application scenario, and is not limited herein.
As an example, the position information may be characterized by means of pixel coordinates.
As an example, the card orientation information may be characterized by an angular difference from the forward position.
In this implementation manner, the card position information and the card direction information may be determined in various manners, which is not limited herein.
And step 1022, identifying the card image according to the card position information and the card direction information to obtain card information.
Here, after the card position information and the card direction information are obtained, the card image may be acquired from the original image. Then, the card image can be identified to obtain card information.
It should be noted that, by acquiring the card position information and the card direction information first and then performing identification according to the card position information and the card direction information, efficiency and accuracy in card information identification can be improved. Specifically, if the mode of identifying the whole original image is adopted, the identification calculation amount is increased; if the mode of carrying out a plurality of angle rotations on the card direction after the position is identified is adopted as the identification basis, the calculation amount of identification is increased.
In some embodiments, the step 1021 may include: and (4) importing the original image into a pre-trained card detection model to obtain card position information and card direction information.
Here, the above-described card detection model may be trained in advance for detecting the position and orientation of the card image.
Here, the principle and the specific structure on which the card detection model is based may be set according to an actual application scenario, and are not limited herein.
As an example, the card detection model may be obtained by training an initial neural network using a machine learning method.
Here, the card detection model may include a position detection submodel and a direction detection submodel.
Here, the position detection submodel may be used to detect the position of the card. The specific structure of the position detection submodel may be set according to an actual application scenario, and is not limited herein.
As an example, the location detection submodel may be established based on image segmentation.
As an example, the location detection submodel may be established based on object detection.
Here, the above-described direction detection submodel may be used to detect the direction of the card. The specific structure of the direction detection submodel may be set according to an actual application scenario, and is not limited herein.
Here, the output of the position detection submodel is connected to the input of the direction detection submodel.
Here, the input of the position detection submodel may include an original image, and the output may include card position information.
Here, the input of the above-described direction detection submodel may include card position information and image feature information, and the output may include card position information and card direction information. Here, the image characteristic information may include, but is not limited to, at least one of: original image, feature extraction image of original image.
It should be noted that, the position information and the direction of the card can be determined quickly by the position detection submodel and the direction detection submodel, so that the speed and the accuracy of the process of identifying the card information are improved.
In some embodiments, the card detection model is trained by: acquiring a training sample set; and training an initial detection network based on a training sample set to generate the card detection model.
Here, the initial detection network may include a location detection sub-network and a direction detection sub-network.
Here, at least one training sample of the set of training samples includes a card image. That is, the training samples in the training sample set may or may not include card images, but at least one training sample including card images exists.
Here, the card position information and the card direction information of the card image in the training sample have a correspondence relationship with the training sample.
Here, the training process can be briefly described as follows: leading the training sample into an initial detection network, and outputting position information and direction information by the initial detection network; comparing the position information and the direction information output by the initial detection network with the card position information and the card direction information of the card image in the training sample respectively to generate a comparison result; and adjusting the initial detection network according to the comparison result. And obtaining the card detection model through multiple iterations.
In this implementation, the specific structure of the initial detection network is not limited. As an example, the initial detection network may be established based on a convolutional neural network, a long-term memory network, or the like.
In this implementation, the initial detection network includes an initial position detection sub-network and an initial direction detection sub-network. The output of the initial position detection sub-network is connected to the input of the initial direction detection sub-network.
Similarly, the specific structure of the initial position detection sub-network or the initial direction detection sub-network is not limited. As an example, the initial position detection sub-network or the initial direction detection sub-network may be established based on a convolutional neural network, a long-term memory network, or the like.
In some embodiments, the set of training samples includes at least one training sample that includes an image of a malformed card.
Here, the defective card image may be a card image having a defect with respect to the complete card image. It is to be understood that the cards corresponding to the defective card images are not necessarily defective. The card image may be incomplete due to shooting reasons and the like.
Here, the defective card image is used as a training sample, so that the detection accuracy of the card detection model for the defective card image in the original image can be improved.
As an example, when the user captures the original image, the position of the card image in the original image is not limited, which may cause the card image in the original image to have blurred edges or missing edges. The initial detection network is trained by utilizing the incomplete card images, so that the trained card detection model has better identification capability on the card images with blurred or missing edges.
In other words, in a card image recognition scene without limiting the position and direction of the card image, the training sample including the incomplete card image is used for training the initial detection network, so that the defects of the card image in the scene can be effectively adapted and compensated, the accuracy of the trained card detection model is greatly improved, and the accuracy of card information recognition is improved.
It is understood that the complete card image can be processed in various ways to obtain the defective card image, which is not limited herein.
In some embodiments, the defective card image may be obtained by at least one of: blurring the edge of the card image; the edges of the card image are cut away.
As an example, blurring the edge of the card image may be performed by averaging pixels near the edge of the card image.
As an example, the edge of the card image is cut off, and the cutting may be performed by setting pixels near the edge of the card image to a background color.
In some embodiments, the step 1022 may include: and according to the card type of the card corresponding to the card image, carrying out image recognition on the card image by adopting an image recognition model matched with the card type.
Here, the image recognition model matching the card type may be trained based on the card image of the card type.
As an example, if the card is a bank card, the card information may be identified using an image recognition model established for the bank card information.
As an example, if the card is a ticket, the ticket information may be identified using an image recognition model established for the ticket information.
For example, the card type corresponding to the card image may be obtained by pre-detection, may be selected by a user, or may be determined according to an application environment.
For example, if the user invokes the identification method of the present application when using the payment function, the application environment may determine that the card type is a bank card.
It should be noted that, by using the image recognition model matched with the card information, the accuracy of image recognition can be improved, and the speed of image recognition can be increased. In other words, compared with the image recognition model which is universal for each scene, the image recognition model matched with the card type can recognize the fixed areas of various information in the card image, perform targeted image recognition on each fixed area in the card image, and improve the image recognition speed; and the accuracy of image recognition can be improved from the aspects of the discrimination of various information in the card, the semantic accuracy and the like.
With further reference to fig. 5, as an implementation of the methods shown in the above-mentioned figures, the present disclosure provides an embodiment of a card image recognition apparatus, which corresponds to the method embodiment shown in fig. 1, and which is particularly applicable to various electronic devices.
As shown in fig. 5, the card image recognition apparatus of the present embodiment includes: an acquisition unit 501 and a recognition unit 502. The card acquisition unit is used for acquiring an original image comprising a card image, wherein the position and/or the direction of the card image in an image acquisition preview interface are random; and the identification unit is used for identifying the card information indicated by the card image from the original image.
In this embodiment, specific processing of the obtaining unit 501 and the identifying unit 502 of the card image identifying apparatus and technical effects thereof can refer to related descriptions of step 101 and step 102 in the corresponding embodiment of fig. 1, which are not repeated herein.
In some embodiments, the obtaining an original image comprising an image of a card comprises: acquiring an original image based on an image acquisition preview interface, wherein the position and/or the direction of the card image in the image acquisition preview interface are arbitrary.
In some embodiments, the identifying, from the original image, card information indicated by the card image includes: determining card position information and card direction information, wherein the card position information indicates a position of the card image in the original image, and the card direction information indicates a direction of the card image in the original image; and identifying the card image according to the card position information and the card direction information to obtain card information.
In some embodiments, the determining card position information and card orientation information comprises: importing the original image into a pre-trained card detection model to obtain card position information and card direction information; the card detection model comprises a position detection submodel and a direction detection submodel, wherein the position detection submodel is used for judging card position information, the direction detection submodel is used for judging the card direction information, and the output of the position detection submodel is connected with the input of the direction detection submodel.
In some embodiments, the card detection model is trained by: acquiring a training sample set, wherein at least one training sample in the training sample set comprises a card image, and the card position information and the card direction information of the card image in the training sample have a corresponding relation with the training sample; training an initial detection network based on a training sample set to generate the card detection model; wherein the initial detection network comprises an initial position detection sub-network and an initial direction detection sub-network.
In some embodiments, wherein the set of training samples includes at least one training sample including an image of a malformed card.
In some embodiments, the image of the malformed card is obtained by at least one of: blurring the edge of the card image; the edges of the card image are cut away.
In some embodiments, the recognizing the card image according to the card position information and the card direction information to obtain card information includes: and identifying the card image by adopting an image identification model matched with the card type according to the card type of the card corresponding to the card image, wherein the image identification model matched with the card type is obtained by training based on the card image of the card type.
In some embodiments, the card corresponding to the card image is in any one of the following shapes: rectangular, circular, oval, triangular.
Referring to fig. 6, fig. 6 illustrates an exemplary system architecture to which the card image recognition method of one embodiment of the present disclosure may be applied.
As shown in fig. 6, the system architecture may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 serves to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
The terminal devices 601, 602, 603 may interact with the server 605 via the network 604 to receive or send messages or the like. The terminal devices 601, 602, 603 may have various client applications installed thereon, such as a web browser application, a search-type application, and a news-information-type application. The client application in the terminal device 601, 602, 603 may receive the instruction of the user, and complete the corresponding function according to the instruction of the user, for example, add the corresponding information in the information according to the instruction of the user.
The terminal devices 601, 602, 603 may be hardware or software. When the terminal devices 601, 602, 603 are hardware, they may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture Experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like. When the terminal device 601, 602, 603 is software, it can be installed in the electronic devices listed above. It may be implemented as multiple pieces of software or software modules (e.g., software or software modules used to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 605 may be a server providing various services, for example, receiving an information acquisition request sent by the terminal devices 601, 602, and 603, and acquiring the presentation information corresponding to the information acquisition request in various ways according to the information acquisition request. And the relevant data of the presentation information is sent to the terminal devices 601, 602, 603.
It should be noted that the card image recognition method provided by the embodiment of the present disclosure may be executed by a terminal device, and accordingly, the card image recognition apparatus may be disposed in the terminal device 601, 602, 603. In addition, the card image recognition method provided by the embodiment of the present disclosure may also be executed by the server 605, and accordingly, the card image recognition apparatus may be disposed in the server 605.
It should be understood that the number of terminal devices, networks, and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to fig. 7, shown is a schematic diagram of an electronic device (e.g., a terminal device or a server of fig. 6) suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 7, the electronic device may include a processing device (e.g., central processing unit, graphics processor, etc.) 701, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage device 708 into a Random Access Memory (RAM) 703. In the RAM703, various programs and data necessary for the operation of the electronic apparatus 700 are also stored. The processing device 701, the ROM 702, and the RAM703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Generally, the following devices may be connected to the I/O interface 705: input devices 706 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 707 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 708 including, for example, magnetic tape, hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device to communicate wirelessly or by wire with other devices to exchange data. While fig. 7 illustrates an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via the communication means 709, or may be installed from the storage means 708, or may be installed from the ROM 702. The computer program, when executed by the processing device 701, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. 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 of the computer readable storage medium may include, but are not limited to: 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 present disclosure, 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. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many 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: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring an original image comprising a card image, wherein the card image has any position and/or direction in an image acquisition preview interface; and identifying card information indicated by the card image from the original image.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a cell does not in some cases constitute a limitation of the cell itself, for example, the acquisition cell may also be described as a "cell acquiring at least the original image".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (12)

1. A card image recognition method is characterized by comprising the following steps:
acquiring an original image comprising a card image, wherein the card image has any position and/or direction in an image acquisition preview interface;
and identifying card information indicated by the card image from the original image.
2. The method of claim 1, wherein said obtaining an original image comprising an image of a card comprises:
acquiring an original image based on an image acquisition preview interface, wherein the position and/or the direction of the card image in the image acquisition preview interface are arbitrary.
3. The method of claim 1, wherein the identifying card information indicated by the card image from the original image comprises:
determining card position information and card direction information, wherein the card position information indicates a position of the card image in the original image, and the card direction information indicates a direction of the card image in the original image;
and identifying the card image according to the card position information and the card direction information to obtain card information.
4. The method of claim 3, wherein determining card position information and card orientation information comprises:
importing the original image into a pre-trained card detection model to obtain card position information and card direction information;
the card detection model comprises a position detection submodel and a direction detection submodel, wherein the position detection submodel is used for judging card position information, the direction detection submodel is used for judging the card direction information, and the output of the position detection submodel is connected with the input of the direction detection submodel.
5. The method of claim 4, wherein the card detection model is trained by:
acquiring a training sample set, wherein at least one training sample in the training sample set comprises a card image, and the card position information and the card direction information of the card image in the training sample have a corresponding relation with the training sample;
training an initial detection network based on a training sample set to generate the card detection model;
wherein the initial detection network comprises an initial position detection sub-network and an initial direction detection sub-network.
6. The method of claim 5, wherein the set of training samples includes at least one training sample comprising an image of a malformed card.
7. The method of claim 6, wherein the image of the malformed card is obtained by at least one of:
blurring the edge of the card image;
the edges of the card image are cut away.
8. The method of claim 3, wherein the recognizing the card image to obtain card information according to the card position information and the card direction information comprises:
and identifying the card image by adopting an image identification model matched with the card type according to the card type of the card corresponding to the card image, wherein the image identification model matched with the card type is obtained by training based on the card image of the card type.
9. The method of claim 1, wherein the card corresponding to the card image is in any one of the following shapes: rectangular, circular, oval, triangular.
10. A card image recognition apparatus, comprising:
the card acquisition device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring an original image comprising a card image, and the position and/or direction of the card image in an image acquisition preview interface are arbitrary;
and the identification unit is used for identifying the card information indicated by the card image from the original image.
11. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-9.
12. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-9.
CN202011289940.9A 2020-11-17 2020-11-17 Card image recognition method and device and electronic equipment Pending CN112270305A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011289940.9A CN112270305A (en) 2020-11-17 2020-11-17 Card image recognition method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011289940.9A CN112270305A (en) 2020-11-17 2020-11-17 Card image recognition method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN112270305A true CN112270305A (en) 2021-01-26

Family

ID=74340207

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011289940.9A Pending CN112270305A (en) 2020-11-17 2020-11-17 Card image recognition method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112270305A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112906560A (en) * 2021-02-11 2021-06-04 河北鸟巢科技有限公司 Target picture, identification system and identification method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106446946A (en) * 2016-09-22 2017-02-22 北京小米移动软件有限公司 Image recognition method and device
CN108009990A (en) * 2017-11-30 2018-05-08 北京小米移动软件有限公司 Tilt object processing method and device
CN109034050A (en) * 2018-07-23 2018-12-18 顺丰科技有限公司 ID Card Image text recognition method and device based on deep learning
CN111860522A (en) * 2020-07-23 2020-10-30 中国平安人寿保险股份有限公司 Identity card picture processing method and device, terminal and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106446946A (en) * 2016-09-22 2017-02-22 北京小米移动软件有限公司 Image recognition method and device
CN108009990A (en) * 2017-11-30 2018-05-08 北京小米移动软件有限公司 Tilt object processing method and device
CN109034050A (en) * 2018-07-23 2018-12-18 顺丰科技有限公司 ID Card Image text recognition method and device based on deep learning
CN111860522A (en) * 2020-07-23 2020-10-30 中国平安人寿保险股份有限公司 Identity card picture processing method and device, terminal and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
YUANXUE XIN 等: "An Automatic Location and Recognition Method for Bank Card Number", 《RICAI 2019: PROCEEDINGS OF THE 2019 INTERNATIONAL CONFERENCE ON ROBOTICS, INTELLIGENT CONTROL AND ARTIFICIAL INTELLIGENCE》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112906560A (en) * 2021-02-11 2021-06-04 河北鸟巢科技有限公司 Target picture, identification system and identification method

Similar Documents

Publication Publication Date Title
CN111369427B (en) Image processing method, image processing device, readable medium and electronic equipment
CN108734106B (en) Rapid riot and terrorist video identification method based on comparison
CN110059623B (en) Method and apparatus for generating information
CN111784712B (en) Image processing method, device, equipment and computer readable medium
CN109583389B (en) Drawing recognition method and device
CN114282581A (en) Training sample obtaining method and device based on data enhancement and electronic equipment
CN113326768A (en) Training method, image feature extraction method, image recognition method and device
CN110705511A (en) Blurred image recognition method, device, equipment and storage medium
CN111209856B (en) Invoice information identification method and device, electronic equipment and storage medium
US20220270352A1 (en) Methods, apparatuses, devices, storage media and program products for determining performance parameters
CN112257478A (en) Code scanning method, device, terminal and storage medium
CN115294501A (en) Video identification method, video identification model training method, medium and electronic device
CN114663871A (en) Image recognition method, training method, device, system and storage medium
CN112270305A (en) Card image recognition method and device and electronic equipment
CN111797266B (en) Image processing method and apparatus, storage medium, and electronic device
CN112967264A (en) Defect detection method and device, electronic equipment and storage medium
CN111062374A (en) Identification method, device, system, equipment and readable medium of identity card information
CN111311358A (en) Information processing method and device and electronic equipment
CN110765304A (en) Image processing method, image processing device, electronic equipment and computer readable medium
CN115690845A (en) Motion trail prediction method and device
CN113033552B (en) Text recognition method and device and electronic equipment
CN113255812B (en) Video frame detection method and device and electronic equipment
CN111401182B (en) Image detection method and device for feeding rail
CN111586295B (en) Image generation method and device and electronic equipment
CN110334763B (en) Model data file generation method, model data file generation device, model data file identification device, model data file generation apparatus, model data file identification apparatus, and model data file identification 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