Methods for system and computer implementation of character recognition in payment cards
By calculating the derivative and ROI of the payment card image, and combining histogram and AI technologies, the accuracy problem of OCR in payment card character recognition was solved, and automated payment information filling was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-01-16
- Publication Date
- 2026-03-13
AI Technical Summary
Existing optical character recognition (OCR) technology is not very effective at recognizing embossed card numbers, especially in poor lighting conditions or complex backgrounds, making it difficult to accurately identify characters on payment cards.
By receiving payment card images, calculating the derivative of the images, identifying regions of interest (ROIs), extracting characters using histograms, and utilizing trained artificial intelligence techniques for character recognition.
It improves the accuracy of payment card character recognition under poor lighting conditions, can automatically fill in payment information, and is suitable for mobile applications.
Smart Images

Figure CN115088024B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to image processing. Specifically, but not exclusively, this disclosure relates to a system and method for character recognition based on an image of a payment card. Background Technology
[0002] Recent trends indicate a significant increase in mobile app-based online payments in the smartphone-centric e-commerce market. For online payments, users need to manually enter payment information, including card details, expiration date, and name, into each mobile app. An automatic character recognition technology is needed to identify characters from the image of the payment card, convert the identified characters into digital data, and automatically populate the payment information within the mobile app. Traditional Optical Character Recognition (OCR) is an automatic character recognition technology that converts text in an image into digital data. However, OCR is not suitable for recognizing embossed text in images. For images captured under poor lighting conditions or with low contrast, OCR's recognition rate is extremely low.
[0003] Furthermore, unlike printed card numbers, payment cards with embossed card numbers are difficult to distinguish from the card's background. Many payment cards include decorative images / patterns in their backgrounds, making it difficult to identify characters based on the image. Identification becomes even more difficult when the gold or silver foil on the embossed card number has worn off. Additionally, light reflection from the card's surface and the different standard fonts used by different payment card issuers further reduce the accuracy of character recognition.
[0004] The information disclosed in this Background section of this disclosure is intended only to enhance the understanding of the general background of this disclosure and should not be construed as an acknowledgment or any form of implied knowledge that such information constitutes prior art known to those skilled in the art. Summary of the Invention
[0005] Additional features and advantages are achieved through the technology disclosed herein. Other embodiments and aspects of this disclosure are described in detail herein and are considered part of the claimed disclosure.
[0006] In some non-limiting embodiments or aspects, a computer-implemented method is provided, comprising: receiving, by a computing unit, an image of a payment card and one or more details associated with the payment card, wherein the payment card includes a plurality of characters; determining, by the computing unit, a derivative of the image based on the one or more details; determining, by the computing unit, a horizontal sum of pixel values of a plurality of rows in the image based on the derivative of the image; identifying, by the computing unit, one or more regions of interest (ROIs) in the image by comparing the horizontal sum of the pixel values with a predefined first threshold; extracting one or more characters from the plurality of characters in the one or more ROIs by the computing unit using one or more peaks in the histograms of the one or more ROIs; and identifying, by the computing unit, each of the one or more characters extracted from the one or more ROIs using trained artificial intelligence (AI) technology, wherein the identified one or more characters are provided to one or more applications for performing one or more actions.
[0007] In some non-limiting embodiments or aspects, the one or more details include at least one of the following: the size of the payment card, the spatial location of the one or more ROIs, the presence and spatial location of the microchip, and the presence and spatial location of the logo. In some non-limiting embodiments or aspects, determining the derivative of the image includes calculating the convolution of pixel values in the image with the filter values of the kernel. In some non-limiting embodiments or aspects, the horizontal sum of pixel values is determined by adding the pixel values of one or more rows of the plurality of rows in the image. In some non-limiting embodiments or aspects, the horizontal sum of pixel values is calculated for one or more rows of the plurality of rows in the image, from the top portion to the bottom portion of the image. In some non-limiting embodiments or aspects, the horizontal sum of pixel values greater than a predefined first threshold indicates the presence of one or more characters in one or more rows, and the horizontal sum of pixel values less than the predefined first threshold indicates the absence of one or more characters in one or more rows. In some non-limiting embodiments or aspects, each of the one or more ROIs includes one or more rows of the plurality of rows of the image, wherein the one or more rows include the one or more characters.
[0008] In some non-limiting embodiments or aspects, extracting the one or more characters includes: selecting the one or more peaks in descending order based on the magnitude of the one or more peaks in the histogram; determining the vertical sum of pixel values adjacent to the selected one or more peaks and comparing it with a predefined second threshold; and aggregating one or more columns of columns adjacent to the selected one or more peaks based on the comparison with the predefined second threshold. In some non-limiting embodiments or aspects, the vertical sum of pixel values is determined by adding the pixel values in the one or more columns of columns adjacent to the selected one or more peaks in the image within the one or more ROIs. In some non-limiting embodiments or aspects, the trained AI technique is a trained deep learning algorithm based on a convolutional neural network. In some non-limiting embodiments or aspects, training the AI technique includes: providing a plurality of characters as input to the AI technique, wherein the desired output of the AI technique for the plurality of characters is known; comparing the output of the AI technique with the desired output; and using supervised learning techniques to tune one or more parameters of the AI technique based on the comparison.
[0009] In some non-limiting embodiments or aspects, a computing unit for character recognition is provided, comprising: a processor; and a memory communicatively coupled to the processor, wherein the memory stores processor instructions that, when executed, cause the processor to: receive an image of a payment card and one or more details associated with the payment card, wherein the payment card includes a plurality of characters; determine a derivative of the image based on the one or more details; determine a horizontal sum of pixel values of a plurality of rows in the image based on the derivative of the image; identify one or more regions of interest (ROIs) in the image by comparing the horizontal sum of the pixel values with a predefined first threshold; extract one or more characters from the plurality of characters in the one or more ROIs using one or more peaks in the histograms of the one or more ROIs; and identify each of the one or more characters extracted from the one or more ROIs using trained artificial intelligence (AI) techniques, wherein the identified one or more characters are provided to one or more applications for performing one or more actions.
[0010] In some non-limiting embodiments or aspects, the processor is configured to receive the one or more detailed information, including at least one of the following: the size of the payment card, the spatial location of the one or more ROIs, the presence and spatial location of the microchip, and the presence and spatial location of the logo. In some non-limiting embodiments or aspects, the processor is configured to determine the derivative of the image by calculating the convolution of pixel values in the image with the filter values of the kernel. In some non-limiting embodiments or aspects, the processor is configured to determine the horizontal sum of pixel values by adding the pixel values of one or more rows of the plurality of rows in the image. In some non-limiting embodiments or aspects, the processor is configured to calculate the horizontal sum of pixel values for one or more rows of the plurality of rows in the image, from the top portion to the bottom portion of the image. In some non-limiting embodiments or aspects, the processor is configured to determine that one or more characters exist in one or more rows when the horizontal sum of pixel values is greater than the predefined first threshold, and to determine that one or more characters do not exist in one or more rows when the horizontal sum of pixel values is less than the predefined first threshold.
[0011] In some non-limiting embodiments or aspects, the processor is configured to extract the one or more characters by: selecting the one or more peaks in descending order based on the magnitude of the one or more peaks in the histogram; determining the vertical sum of pixel values adjacent to the selected one or more peaks and comparing it with a predefined second threshold; and aggregating one or more columns of columns adjacent to the selected one or more peaks based on the comparison with the predefined second threshold. In some non-limiting embodiments or aspects, the processor is configured to determine the vertical sum of pixel values by adding the pixel values of one or more columns of columns adjacent to the selected one or more peaks in the image within the one or more ROIs. In some non-limiting embodiments or aspects, the processor is configured to train the AI technology by: providing a plurality of characters as input to the AI technology, wherein the desired output of the AI technology for the plurality of characters is known; comparing the output of the AI technology with the desired output; and adjusting one or more parameters of the AI technology using supervised learning techniques based on the comparison.
[0012] Further non-limiting embodiments or aspects are set forth in the following numbered clauses.
[0013] Clause 1: A computer-implemented method comprising: receiving, by a computing unit, an image of a payment card and one or more details associated with the payment card, wherein the payment card includes a plurality of characters; determining, by the computing unit, a derivative of the image based on the one or more details; determining, by the computing unit, a horizontal sum of pixel values of a plurality of rows in the image based on the derivative of the image; identifying, by the computing unit, one or more regions of interest (ROIs) in the image by comparing the horizontal sum of the pixel values with a predefined first threshold; extracting one or more characters from the plurality of characters in the one or more ROIs using one or more peaks in a histogram of the one or more ROIs; and identifying, by the computing unit, each of the one or more characters extracted from the one or more ROIs using trained artificial intelligence (AI) technology, wherein the identified one or more characters are provided to one or more applications for performing one or more actions.
[0014] Clause 2: The method described in Clause 1, wherein the one or more details include at least one of the following: the size of the payment card, the spatial location of the one or more ROIs, the presence and spatial location of the microchip, and the presence and spatial location of the logo.
[0015] Clause 3: The method according to Clause 1 or 2, wherein determining the derivative of the image comprises calculating the convolution of pixel values in the image with the filter values of the kernel.
[0016] Clause 4: The method according to any one of Clauses 1 to 3, wherein the level sum of pixel values is determined by adding the pixel values of one or more of the plurality of rows in the image.
[0017] Clause 5: The method according to any one of Clauses 1 to 4, wherein the horizontal sum of pixel values is calculated for one or more rows of the plurality of rows in the image from the top portion of the image to the bottom portion of the image.
[0018] Clause 6: The method according to any one of Clauses 1 to 5, wherein the level of pixel values greater than the predefined first threshold indicates the presence of one or more characters in one or more rows, and the level of pixel values less than the predefined first threshold indicates the absence of one or more characters in one or more rows.
[0019] Clause 7: The method according to any one of Clauses 1 to 6, wherein each of the one or more ROIs comprises one or more rows of the image in the plurality of rows, wherein the one or more rows comprise the one or more characters.
[0020] Clause 8: The method according to any one of Clauses 1 to 7, wherein extracting the one or more characters comprises: selecting the one or more peaks in descending order based on the magnitude values of the one or more peaks in the histogram; determining the vertical sum of pixel values adjacent to the selected one or more peaks and comparing it with a predefined second threshold; and aggregating one or more columns of columns adjacent to the selected one or more peaks based on the comparison with the predefined second threshold.
[0021] Clause 9: The method according to any one of Clauses 1 to 8, wherein the vertical sum of pixel values is determined by adding the pixel values in one or more columns of the column adjacent to the selected one or more peaks in the image within the one or more ROIs.
[0022] Clause 10: The method according to any one of Clauses 1 to 9, wherein the trained AI technology is a trained deep learning algorithm based on a convolutional neural network.
[0023] Clause 11: The method according to any one of Clauses 1 to 10, wherein training the AI technology comprises: providing a plurality of characters as input to the AI technology, wherein the desired output of the AI technology for the plurality of characters is known; comparing the output of the AI technology with the desired output; and using supervised learning techniques based on the comparison to adjust one or more parameters of the AI technology.
[0024] Clause 12: A computing unit for character recognition, comprising: a processor; and a memory communicatively coupled to the processor, wherein the memory stores processor instructions that, when executed, cause the processor to: receive an image of a payment card and one or more details associated with the payment card, wherein the payment card includes a plurality of characters; determine a derivative of the image based on the one or more details; determine a horizontal sum of pixel values of a plurality of rows in the image based on the derivative of the image; identify one or more regions of interest (ROIs) in the image by comparing the horizontal sum of the pixel values with a predefined first threshold; extract one or more characters from the plurality of characters in the one or more ROIs using one or more peaks in a histogram of the one or more ROIs; and identify each of the one or more characters extracted from the one or more ROIs using trained artificial intelligence (AI) techniques, wherein the identified one or more characters are provided to one or more applications for performing one or more actions.
[0025] Clause 13: The computing unit pursuant to Clause 12, wherein the processor is configured to receive one or more detailed information, including at least one of the size of the payment card, the spatial location of the one or more ROIs, the presence and spatial location of the microchip, and the presence and spatial location of the logo.
[0026] Clause 14: The computing unit according to Clause 12 or 13, wherein the processor is configured to determine the derivative of the image by calculating the convolution of pixel values in the image with the filter values of the kernel.
[0027] Clause 15: A computing unit according to any one of Clauses 12 to 14, wherein the processor is configured to determine the level sum of pixel values by adding the pixel values of one or more of the plurality of rows in the image.
[0028] Clause 16: A computing unit according to any one of Clauses 12 to 15, wherein the processor is configured to calculate the horizontal sum of pixel values for one or more of the plurality of rows in the image, from the top portion of the image to the bottom portion of the image.
[0029] Clause 17: A computing unit according to any one of Clauses 12 to 16, wherein the processor is configured to determine that one or more characters exist in one or more rows when the horizontal sum of pixel values is greater than the predefined first threshold, and to determine that one or more characters do not exist in one or more rows when the horizontal sum of pixel values is less than the predefined first threshold.
[0030] Clause 18: A computing unit according to any one of Clauses 12 to 17, wherein the processor is configured to extract the one or more characters by: selecting the one or more peaks in descending order based on the magnitude values of the one or more peaks in the histogram; determining the vertical sum of pixel values adjacent to the selected one or more peaks and comparing it with a predefined second threshold; and aggregating one or more columns adjacent to the selected one or more peaks based on the comparison with the predefined second threshold.
[0031] Clause 19: A computing unit according to any one of Clauses 12 to 18, wherein the processor is configured to determine the vertical sum of pixel values by adding the pixel values of one or more columns of columns adjacent to the selected one or more peaks in the image within the one or more ROIs.
[0032] Clause 20: A computing unit according to any one of Clauses 12 to 19, wherein the processor is configured to train the AI technology by: providing a plurality of characters as input to the AI technology, wherein the desired output of the AI technology for the plurality of characters is known; comparing the output of the AI technology with the desired output; and using supervised learning techniques based on the comparison to adjust one or more parameters of the AI technology.
[0033] This document discloses a computer-implemented method for character recognition in a payment card. The method includes receiving an image of a payment card and one or more details associated with the payment card, wherein the payment card includes multiple characters. Furthermore, the method includes determining a derivative of the image based on the one or more details. Additionally, the method includes determining a horizontal sum of pixel values from multiple rows in the image based on the derivative of the image. Subsequently, the method includes identifying one or more regions of interest (ROIs) in the image by comparing the horizontal sum of the pixel values with a predefined first threshold. Thereafter, the method includes extracting one or more characters from the multiple characters in the one or more ROIs using one or more peaks in the histograms of the one or more ROIs. Finally, the method includes recognizing each of the one or more characters extracted from the one or more ROIs using trained artificial intelligence (AI) techniques, wherein the recognized one or more characters are provided to one or more applications for performing one or more actions.
[0034] Furthermore, in some non-limiting embodiments or aspects, this disclosure may include a computing unit for character recognition. The computing unit includes: a processor; and a memory communicatively coupled to the processor, wherein the memory stores processor-executable instructions that, upon execution, cause the processor to receive an image of a payment card and one or more details associated with the payment card, wherein the payment card includes a plurality of characters. Furthermore, the processor is configured to determine a derivative of the image based on the one or more details. Furthermore, the processor is configured to determine a horizontal sum of pixel values in a plurality of rows of the image based on the derivative of the image. Subsequently, the processor is configured to identify one or more regions of interest (ROIs) in the image by comparing the horizontal sum of the pixel values with a predefined first threshold. Thereafter, the processor is configured to extract one or more characters from the plurality of characters in the one or more ROIs using one or more peaks in the histograms of the one or more ROIs. Finally, the processor is configured to recognize each of the one or more characters extracted from the one or more ROIs using trained artificial intelligence (AI) technology, wherein the recognized one or more characters are provided to one or more applications for performing one or more actions.
[0035] The foregoing overview is merely illustrative and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, other aspects, embodiments, and features will become apparent from the drawings and the following detailed description. Attached Figure Description
[0036] The novel features and characteristics of this disclosure are set forth in the appended claims. However, the disclosure itself, as well as preferred modes of use, additional objectives, and advantages thereof, can be best understood by referring to the following detailed description of illustrative embodiments when read in conjunction with the accompanying drawings. The accompanying drawings, which are incorporated in and constitute a part of this disclosure, illustrate exemplary embodiments and, together with the description, serve to explain the principles disclosed. In the drawings, the leftmost digit of the reference numerals identifies the figure in which the reference numeral first appears. One or more embodiments will now be described by way of example only with reference to the accompanying drawings, wherein similar reference numerals denote similar elements, and in the drawings:
[0037] Figure 1 Exemplary environments for character recognition based on images of payment cards are shown, according to some non-limiting embodiments or aspects of this disclosure;
[0038] Figure 2 A simplified block diagram of a computing unit for character recognition based on an image of a payment card, according to some non-limiting embodiments or aspects of this disclosure, is shown.
[0039] Figure 3 A flowchart illustrating method steps for character recognition based on an image of a payment card, according to some non-limiting embodiments or aspects of this disclosure, is shown.
[0040] Figure 4A Images of exemplary payment cards according to some non-limiting embodiments or aspects of this disclosure are shown;
[0041] Figure 4B Examples illustrating one or more details associated with a payment card according to some non-limiting embodiments or aspects of this disclosure;
[0042] Figure 4C Exemplary derivatives of images of payment cards according to some non-limiting embodiments or aspects of this disclosure are shown;
[0043] Figure 4D Exemplary convolutions of a first matrix and a second matrix are shown according to some non-limiting embodiments or aspects of this disclosure;
[0044] Figure 4E An exemplary determination of the level sum of pixel values in one or more rows of the derivatives of an image according to some non-limiting embodiments or aspects of this disclosure;
[0045] Figure 4F One or more regions of interest (ROIs) in an image of an exemplary payment card according to some non-limiting embodiments or aspects of this disclosure are shown;
[0046] Figure 4G Histograms corresponding to one or more regions of interest (ROIs) identified in an image of an exemplary payment card, according to some non-limiting embodiments or aspects of this disclosure;
[0047] Figure 4H This illustrates one or more characters extracted from an image of an exemplary payment card according to some non-limiting embodiments or aspects of this disclosure;
[0048] Figure 4I This illustrates one or more characters recognized using trained artificial intelligence (AI) technology according to some non-limiting embodiments or aspects of this disclosure; and
[0049] Figure 5 Exemplary computer systems for character recognition in payment cards are shown according to some non-limiting embodiments or aspects of this disclosure.
[0050] Those skilled in the art will understand that any block diagram herein represents a conceptual view of an illustrative system embodying the principles of the subject matter of this invention. Similarly, it will be understood that any flowchart, diagram, state transition diagram, pseudocode, etc., represents various processes that can be represented substantially in a computer-readable medium and executed by a computer or processor, whether or not such a computer or processor is explicitly shown. Detailed Implementation
[0051] In this document, the term "exemplary" is used herein to mean "serving as an example, illustration, or description." Any embodiment or implementation of the subject matter of the invention described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
[0052] In the following detailed description of embodiments of this disclosure, reference is made to the accompanying drawings, which form a part of this disclosure, and specific embodiments in which this disclosure may be practiced are illustrated by way of illustration. However, it should be understood that this disclosure is not intended to be limited to the forms disclosed, but rather, it is intended to cover all modifications, equivalents, and alternatives that fall within the spirit and scope of this disclosure. It should be understood that other embodiments may be utilized and changes may be made without departing from the scope of this disclosure. Therefore, the following description should not be considered restrictive.
[0053] The term "comprises" or any other variation thereof is intended to cover non-exclusive inclusion, such that an arrangement, apparatus, or method that includes a list of components or steps may include not only those components or steps but also other components or steps not expressly listed or inherent to such arrangement, apparatus, or method. In other words, without further constraints, one or more elements in a system or apparatus following "comprises…a" do not exclude the presence of other elements or additional elements in the system or method.
[0054] The term "includes / including" or any other variations thereof is intended to cover non-exclusive inclusion, such that an arrangement, apparatus, or method that includes a list of components or steps may include not only those components or steps but also other components or steps not expressly listed or inherent to such arrangement, apparatus, or method. In other words, without further constraints, one or more elements in a system or device following "includes…a" do not exclude the presence of other elements or additional elements in the system or method.
[0055] The aspects, components, elements, structures, actions, steps, functions, instructions, etc., used herein should not be construed as critical or essential unless explicitly described as such. Furthermore, as used herein, the article “a” is intended to include one or more items and is interchangeable with “one or more” and “at least one.” Additionally, as used herein, the term “set” is intended to include one or more items (e.g., related items, unrelated items, combinations of related and unrelated items, etc.) and is interchangeable with “one or more” or “at least one.” Where only one item is desired, the term “a” or similar language is used. Furthermore, as used herein, the terms “having” and the like are intended to be open-ended terms. Additionally, unless explicitly stated otherwise, the phrase “based on” is intended to mean “at least partially based on.” Unless explicitly specified otherwise, the term “some non-limiting embodiments or aspects” means “one or more (but not all) embodiments or aspects of this disclosure.” The description of some non-limiting embodiments or aspects having several components communicating with each other does not imply that all of these components are required. Rather, various optional components are described to illustrate various possible embodiments of this disclosure.
[0056] When this document describes a single device or article, it will be apparent that more than one device / article (whether or not cooperating) may be used in place of the single device / article. Similarly, when this document describes more than one device or article (whether or not cooperating), it will be apparent that a single device / article may be used in place of more than one device or article, or that a different number of devices / articles may be used in place of the number of devices or programs shown. The functionality and / or features of a device may alternatively be embodied by one or more other devices not explicitly described as having such functionality / features. Therefore, other embodiments of this disclosure need not include the device itself.
[0057] As used herein, the terms “communication,” “transmission,” “send,” and / or “receive” can refer to the receiving, accepting, sending, transmitting, or providing of information (e.g., data, signals, messages, instructions, commands, etc.). Communication between one unit (e.g., an apparatus, system, component of an apparatus or system, or a combination thereof) and another unit means that the first unit is able to receive information directly or indirectly from and / or send information to the other unit. This can refer to a direct or indirect connection that is inherently wired and / or wireless (e.g., a direct communication connection, an indirect communication connection, and / or the like). Furthermore, although the transmitted information may be modified, processed, relayed, and / or routed between the first and second units, the two units can also communicate with each other. For example, the first unit can communicate with the second unit even if it passively receives information and does not actively send information to the second unit. As another example, the first unit can communicate with the second unit if at least one intermediate unit (e.g., a third unit located between the first and second units) processes information received from the first unit and transmits the processed information to the second unit. In some non-limiting embodiments or aspects, a message may refer to a network packet (e.g., a data packet, etc.) that includes data. It should be understood that many other arrangements are possible.
[0058] As used herein, the terms "server" and / or "processor" can refer to one or more computing devices or computing units, such as processors, storage devices, and / or similar computer components, which communicate with client devices and / or other computing devices via networks such as the Internet or private networks, and in some instances facilitate communication between other servers and / or client devices. It should be understood that various other arrangements are possible. As used herein, the term "system" can refer to one or more computing devices or combinations of computing devices, such as, but not limited to, processors, servers, client devices, software applications, and / or other similar components. Furthermore, as used herein, references to "server" or "processor" can refer to the server and / or processor previously stated to perform the preceding steps or functions, different servers and / or processors, and / or combinations of servers and / or processors. For example, as used in the specification and claims, a first server and / or first processor stated to perform a first step or function can refer to the same or different server and / or processor stated to perform a second step or function.
[0059] This disclosure relates to a system and computer-implemented method for character recognition in a payment card. In some non-limiting embodiments or aspects, the method includes receiving an image of a payment card and one or more details associated with the payment card, wherein the payment card includes a plurality of characters. Furthermore, the method includes determining a derivative of the image based on the one or more details. Additionally, the method includes determining a horizontal sum of pixel values of a plurality of rows in the image based on the derivative of the image. Subsequently, the method includes identifying one or more regions of interest (ROIs) in the image by comparing the horizontal sum of the pixel values with a predefined first threshold. Thereafter, the method includes extracting one or more characters from the plurality of characters in the one or more ROIs using one or more peaks in the histograms of the one or more ROIs. Finally, the method includes recognizing each of the one or more characters extracted from the one or more ROIs using trained artificial intelligence (AI) techniques, wherein the recognized one or more characters are provided to one or more applications for performing one or more actions.
[0060] In the following detailed description of embodiments of this disclosure, reference is made to the accompanying drawings, which form a part of this disclosure, and specific embodiments in which this disclosure may be practiced are illustrated by means of illustration. These embodiments are described in sufficient detail to enable those skilled in the art to practice this disclosure, and it should be understood that other embodiments may be utilized and changes may be made without departing from the scope of this disclosure. Therefore, the following description should not be considered limiting.
[0061] Figure 1 This illustration shows an exemplary environment for character recognition based on an image of a payment card, according to some non-limiting embodiments or aspects of this disclosure. In some embodiments, a user (101) may use a device (102) including an image sensor (e.g., a color camera, an infrared camera, etc.) to capture an image (not shown) of a payment card (103). For example, the device (102) is a smartphone or tablet computer, including a user interface, one or more applications for performing one or more actions, etc. The payment card (103) includes multiple characters (104). A computing unit (not shown) may be used to process the image of the payment card (103) to recognize the multiple characters (104) in the image. In some non-limiting embodiments or aspects, the computing unit may be housed within the device (102). In some non-limiting embodiments or aspects, the computing unit may be housed on a server communicatively connected to the device (102) via a communication network (not shown). Furthermore, the communication network may include, for example, direct interconnection, e-commerce networks, peer-to-peer (P2P) networks, local area networks (LANs), wide area networks (WANs), wireless networks (e.g., using wireless application protocols), the Internet, etc. Cellular networks, etc.
[0062] In some non-limiting embodiments or aspects, the computing unit receives an image of the payment card (103) captured by the image sensor of the device (102). Furthermore, the computing unit may receive one or more details associated with the payment card (103). For example, the one or more details may be the size of the payment card (103), the spatial location of the card number, the cardholder's name, the expiration date, etc. The user (101) may provide one or more details using a user interface housed on the device (102).
[0063] In some non-limiting embodiments or aspects, the computing unit determines the derivative of the image based on one or more details. For example, if an image of a payment card (103) is captured in portrait mode, the computing unit can rotate the image to landscape mode and determine the derivative of the image. The image of the payment card (103) is represented as a first matrix having multiple rows and multiple columns. The rows and columns in the first matrix indicate the resolution of the image. One or more values in the first matrix are the pixel values of the image. Furthermore, the derivative of the image is determined by calculating the convolution of the pixel values in the image with the filter values of the kernel. The kernel is represented as a second matrix and stored in the computing unit. One or more values in the second matrix are the filter values of the kernel. The convolution of the kernel with the image is a mathematical operation that generates a third matrix represented as the derivative of the image.
[0064] In some non-limiting embodiments or aspects, the calculation unit determines the horizontal sum of pixel values in multiple rows of the image based on the derivative of the image. The horizontal sum includes aggregating or adding the pixel values into each row of a third matrix. The calculation unit compares the horizontal sum of pixel values in each row of the third matrix with a predefined first threshold. Furthermore, the calculation unit identifies one or more ROIs in the image by selecting one or more rows whose horizontal sum is greater than the predefined first threshold. For example, the predefined first threshold may be 65. The one or more ROIs indicate the presence of one or more characters in multiple characters (104) of the payment card (103).
[0065] In some non-limiting embodiments or aspects, the computing unit determines a histogram for each of one or more Regions of Interest (ROIs) in an image. The histogram is an accurate representation of the distribution of digital data based on the frequency of pixel values. The computing unit uses one or more peaks in the histograms of the one or more ROIs to extract one or more characters from the one or more ROIs. The one or more peaks in the histogram correspond to one or more characters in the one or more ROIs. Furthermore, the computing unit uses trained AI technology to identify each of the one or more characters extracted from the one or more ROIs.
[0066] In some non-limiting embodiments or aspects, the trained AI technology may include at least one of convolutional neural networks based on deep learning models, long short-term memory (LSTM), etc. The AI technology is trained by tuning one or more parameters using supervised learning techniques. The computing unit provides one or more recognized characters (105) to one or more applications in the device (102). One or more applications may use the recognized characters (105) to perform one or more actions. For example, one or more applications may include at least one of payment applications, e-commerce applications, etc. The one or more actions performed by the one or more applications may include at least one of: initiating a payment transaction, such as... Figure 1 The user interface of the device (102) shown presents one or more recognized characters (105) to the user (101), and automatically fills in payment information using the one or more recognized characters (105).
[0067] Figure 2 A simplified block diagram of a computing unit (200) for character recognition based on an image of a payment card (103) according to some non-limiting embodiments or aspects of this disclosure is shown. In some non-limiting embodiments or aspects, the computing unit (200) may include at least one central processing unit (“CPU” or “processor”) (201) and a memory (202) storing instructions executable by at least one processor (201). The processor (201) may include at least one data processor for executing program components for performing user- or system-generated requests. The memory (202) is communicatively coupled to the processor (201). The computing unit (200) also includes an input / output (I / O) interface (203). The I / O interface (203) is coupled to the processor (201), through which input signals and / or output signals are transmitted. In some non-limiting embodiments or aspects, the data stored in the memory (202) may include image data (204), ROI data (205), and other data (206).
[0068] In some non-limiting embodiments or aspects, the image data (204) may include at least one of the following: an image of the payment card (103) captured by the device (102), the derivative of the image, one or more details associated with the payment card (103), and the filter value of the kernel. The image of the payment card (103), the derivative of the image, and the filter value of the kernel are represented in matrix form. One or more details include at least one of the following: the size of the payment card (103), the spatial location of one or more ROIs, the presence and spatial location of the microchip, the presence and spatial location of the logo, etc. For example, one or more details may be an indication of the size of the payment card (103) (10cm × 5cm) and the location of the microchip in the upper right corner of the payment card (103).
[0069] In some non-limiting embodiments or aspects, the ROI data (205) may include at least one of the following: a horizontal sum of pixel values, a predefined first threshold, one or more rows of a first matrix indicating one or more ROIs in the image of the payment card (103). In some non-limiting embodiments or aspects, other data (206) may include at least one of the following: one or more identified characters (105) associated with trained AI technology, one or more parameters (e.g., the number of neurons, the kernel value of each neuron, connections between neurons, etc.). In some non-limiting embodiments or aspects, the communication module (207) is configured to receive an image of the payment card (103) from an image sensor associated with the device (102). Furthermore, the identified one or more characters (105) are provided to one or more applications in the device (102). For example, the one or more applications may be a payment application, an e-commerce application, etc.
[0070] In some non-limiting embodiments or aspects, the ROI identification module (208) is configured to determine the derivative of an image of the payment card (103). The derivative of the image can indicate the directional change of intensity values in the image. The derivative of the image is determined by performing a convolution of a first matrix and a second matrix. The first matrix indicates the pixel values of the image, and the second matrix indicates the filter values of the kernel. The pixel values and filter values are stored in image data (204). The ROI identification module (208) is configured to calculate the horizontal sum of pixel values in a plurality of rows in a third matrix. The third matrix indicates the derivative of the image of the payment card (103). Furthermore, the ROI identification module (208) is configured to compare the horizontal sum of each of the plurality of rows in the third matrix with a predefined first threshold. The ROI identification module (208) selects one or more rows whose horizontal sum is greater than the predefined first threshold. The selected one or more rows indicate the presence of one or more characters. The selected one or more rows are identified as one or more ROIs in the image.
[0071] In some non-limiting embodiments or aspects, the extraction module (209) is configured to determine a histogram of one or more ROIs. Based on the position of the peak in the histogram of one or more ROIs, one or more characters are extracted from the image of the payment card (103). For example, the histogram (411) of one or more ROIs is... Figure 4G As shown in the figure. The extracted one or more characters comprise multiple pixel values surrounding the location of a peak in the image of the payment card (103). In some non-limiting embodiments or aspects, the recognition module (210) is configured to recognize each of the one or more characters extracted from one or more ROIs using trained AI techniques. The recognition module (210) may use a deep learning-based convolutional neural network to recognize one or more characters.
[0072] Figure 3 A flowchart (300) illustrating method steps for character recognition based on an image of a payment card (103) according to some non-limiting embodiments or aspects of this disclosure is shown. The order in which the methods are described is not to be construed as limiting, and the methods can be implemented by combining any number of the described method blocks in any order. Furthermore, individual blocks can be removed from the methods without departing from the spirit and scope of the subject matter described herein. Moreover, the methods can be implemented in any suitable hardware, software, firmware, or a combination thereof.
[0073] At step (301), the computing unit (200) receives an image of the payment card (103) and one or more details associated with the payment card (103), wherein the payment card (103) includes multiple characters (104). In addition, the one or more details include at least one of the following: the size of the payment card (103), the spatial location of one or more ROIs, the presence and spatial location of a microchip, the presence and spatial location of a logo, etc.
[0074] like Figure 4A As shown, the computing unit (200) receives an image (401) of a payment card (103). In some non-limiting embodiments or aspects, the computing unit (200) may receive a color image or a grayscale image of the payment card (103). The computing unit (200) converts the color image into a grayscale image. Furthermore, the computing unit (200) may perform one or more image preprocessing techniques on the received image (401) of the payment card (103). The one or more image preprocessing techniques may include at least one of contrast adjustment, sharpening, blurring, etc. Those skilled in the art will understand that the use of additional one or more image preprocessing techniques (e.g., flipping, straightening, red-eye removal, mirroring, normalization, etc.) and the one or more image preprocessing techniques detailed above should not be considered limiting.
[0075] In some non-limiting embodiments or aspects, the computing unit (200) receives one or more details associated with a payment card (103) from the user (101). The user (101) may provide one or more details to the computing unit (200) using a user interface housed on the device (102). The user (101) may manually enter one or more details using a physical keypad or virtual keyboard associated with the device (102) or by selecting checkboxes, etc. Figure 4B As shown, one or more details (402) associated with the payment card (103) are received from the user (101). Reference Figure 3 In step (302), the calculation unit (200) determines the derivative of the image (401) based on one or more detailed information. The derivative of the image (401) is determined by calculating the convolution of the pixel values in the image (401) with the filter values of the kernel.
[0076] In some non-limiting embodiments or aspects, the computing unit (200) stores the received image (401) as a first matrix having multiple rows and multiple columns. The number of rows and columns in the first matrix indicates the resolution of the image (401). One or more values in the first matrix indicate the pixel values of the image (401). The kernel is represented as a second matrix having multiple rows and multiple columns. The number of rows and columns in the second matrix indicates the size of the kernel. One or more values in the second matrix indicate the filter values of the kernel. The filter values of the kernel are obtained using at least one of bilateral filters, Laplacian, Sobel, Roberts, Prewitt, Gaussian, Gabor filters, etc. Those skilled in the art will understand the use of one or more kernels determined using various aspects of image processing, and the kernels detailed above should not be considered limiting. The derivative of the image (401) is determined using the convolution of the image (401) (e.g., the first matrix) with the kernel (e.g., the second matrix). The convolution between the image (401) and the kernel is determined by adding each of the pixel values of the image (401) that have adjacent pixel values and are weighted by the filter values of the kernel. Calculate the derivative of the image (401) using the following equation:
[0077] D = First matrix * Second matrix (1)
[0078] Where “D” represents the derivative of image (401) and “*” represents the convolution operation.
[0079] like Figure 4C As shown, the computation unit (200) convolves the image (401) with the kernel (403) to determine the derivative (404) of the image (401). Figure 4DAs shown, a portion of the image (401) represented as the first matrix (405) is convolved with the filter values of the kernel (403) represented as the second matrix (406) to determine the derivative (404) of the portion of the image (401) represented as the third matrix (407).
[0080] refer to Figure 3 In step (303), the calculation unit (200) determines the horizontal sum of pixel values for multiple rows in the image (401) based on the derivative (404) of the image (401). The horizontal sum of pixel values is determined by adding the pixel values of one or more rows in the image (401). The horizontal sum is calculated for one or more rows in the image (401) from the top portion to the bottom portion of the image (401).
[0081] like Figure 4E As shown, the calculation unit (200) uses a portion of the derivative (404) of the image (401) and the corresponding pixel values of one or more rows (408) of the plurality of rows in the image (401) to determine the level sum of the pixel values. Figure 4E As shown, the calculation unit (200) determines the horizontal sum of pixel values (409) of one or more rows (408) by adding the pixel values of one or more rows (408). In some non-limiting embodiments or aspects, the horizontal sum is determined using the equation given below:
[0082]
[0083] Where Hi represents the horizontal sum of the pixel values (409) of row numbered "i" in the derivative (404) of image (401), "n" represents the number of pixels in row numbered "i", and "xk" represents the pixel value at position "k" in row numbered "i".
[0084] In step (304), the calculation unit (200) identifies one or more ROIs in the image (401) by comparing the level sum of pixel values (409) with a predefined first threshold. Furthermore, each of the one or more ROIs includes one or more rows of the image (401) in a plurality of rows, wherein the one or more rows include one or more characters. In some non-limiting embodiments or aspects, the level sum of pixel values (409) of each row of the derivative (404) of the image (401) is compared with the predefined first threshold. The predefined first threshold is determined using a static method or a dynamic method. A static method includes associating the predefined first threshold with a constant value. For example, using a static method, the predefined first threshold could be 65. A dynamic method includes using one or more image processing techniques, such as averaging, standard deviation, minimum thresholding, etc., to determine the predefined first threshold for each of the derivatives (404) of the image (401). A sum of pixel values (409) greater than a predefined first threshold indicates the presence of one or more characters in one or more rows (408), and a sum of pixel values (409) less than the predefined first threshold indicates the absence of one or more characters in one or more rows (408). Furthermore, the calculation unit (200) selects one or more rows from the image (401) where the sum of pixel values (409) is greater than the predefined first threshold.
[0085] In some non-limiting embodiments or aspects, the calculation unit (200) groups selected one or more rows into one or more Regions of Interest (ROIs) in the image (401). The selected one or more rows are grouped using row numbers from the one or more rows in the image (401). For example, let the row numbers of the selected one or more rows be [51,52,53,54,55,67,68,69,70,120,121,122,123], such that the calculation unit (200) groups row numbers 51 to 55 into a first ROI, 67 to 70 into a second ROI, and 120 to 123 into a third ROI. The first ROI may include one or more characters of a card number, the second ROI may include one or more characters of the expiration date of the payment card (103), and the third ROI may include one or more characters of the cardholder's name. Figure 4F As shown, the calculation unit (200) identifies one or more ROIs (410) by grouping selected one or more rows of the image (401). Reference Figure 3 In step (305), the calculation unit (200) uses one or more peaks in the histogram of one or more ROIs (410) to extract one or more characters from multiple characters (104) in one or more ROIs (410).
[0086] In some non-limiting embodiments or aspects, the calculation unit (200) performs filtering (e.g., bilateral filtering, etc.) on one or more rows of one or more ROIs (410). The calculation unit (200) determines a histogram for each of the one or more ROIs (410). The histogram for each of the one or more ROIs (410) contains a curve or graph of the vertical sum of the column number and the corresponding column number. The vertical sum corresponding to one of the plurality of columns is calculated by adding the pixel values of one or more rows of the corresponding column. For example, in such Figure 4E In an exemplary embodiment or aspect of one or more rows (408) shown, the vertical sum of the third column is determined by adding the pixel values (45 and 16) to 61. Figure 4G As shown, the calculation unit (200) determines a histogram (411) corresponding to one or more ROIs (410). The calculation unit (200) extracts one or more characters in each of the one or more ROIs (410) by selecting the one or more peaks in descending order based on the magnitude of the one or more peaks in the histogram (411). In addition, the calculation unit (200) determines the vertical sum of pixel values adjacent to the selected one or more peaks and compares the vertical sum with a predefined second threshold. The vertical sum is determined by adding the pixel values in one or more columns of columns adjacent to the selected one or more peaks in the image (401) within one or more ROIs (410). The predefined second threshold can be set to a static value, such as -10, 0, 15, etc. In some non-limiting embodiments or aspects, the predefined second threshold is determined dynamically using the average deviation or standard deviation of the pixel values in each of the one or more ROIs (410). In addition, the calculation unit (200) aggregates one or more columns of columns adjacent to the selected one or more peaks based on the comparison with the predefined second threshold. Aggregate the vertical sums of one or more columns adjacent to one or more selected peaks that have values greater than a predefined second threshold, until the vertical sum is less than the predefined second threshold. The aggregated columns correspond to one or more characters (412) extracted from one or more ROIs (410), such as... Figure 4H As shown. Reference Figure 3 In step (306), the computing unit (200) uses trained AI technology to identify each of one or more characters (412) extracted from one or more ROIs (410), wherein the identified one or more characters (105) are provided to one or more applications for performing one or more actions.
[0087] In some non-limiting embodiments or aspects, the trained AI technology is a trained deep learning algorithm based on a convolutional neural network. The architecture of the convolutional neural network may include one or more convolutional layers, one or more pooling layers, one or more rectified linear units, one or more fully connected layers, and one or more lossy layers, including one or more connections between the layers. In some non-limiting embodiments or aspects, the computing unit (200) trains the AI technology by providing multiple characters as input, wherein the desired output of the AI technology for the multiple characters is known. Furthermore, the computing unit (200) compares the output of the AI technology with the desired output. Additionally, the computing unit (200) uses supervised learning techniques to adjust one or more parameters of the AI technology based on the comparison between the output of the AI technology and the desired output. Those skilled in the art will understand that one or more architectures of a convolutional neural network and one or more supervised learning algorithms are used to train the AI technology to recognize one or more characters (412).
[0088] In some non-limiting embodiments or aspects, the computing unit (200) provides one or more characters (412) extracted from one or more ROIs (410) as input to a trained AI technique (413). The output of the trained AI technique (413) includes one or more recognized characters (105), such as... Figure 4I As shown. The computing unit (200) provides one or more identified characters (105) to one or more applications to perform one or more actions. For example, the one or more applications may include at least one of a payment application, an e-commerce application, etc. The one or more actions performed by the one or more applications may include at least one of the following: initiating a payment transaction, such as... Figure 1 The user interface of the device (102) shown presents one or more recognized characters (105) to the user (101), and automatically fills in payment information using the one or more recognized characters (105).
[0089] The method for character recognition in a payment card (103) is used to extract and recognize one or more characters from multiple characters (104) in an image (401) of the payment card (103). Character recognition can be performed on one or more types of payment cards (103), such as printed cards, embossed cards, etc. Furthermore, character recognition is performed accurately under poor lighting conditions and in images with low contrast and / or brightness. In addition, character recognition is performed accurately on payment cards with decorative images / patterns in the background. Character recognition accurately identifies one or more characters in different standard fonts.
[0090] Figure 5A block diagram of an exemplary computer system (500) for implementing embodiments consistent with this disclosure is shown. In some non-limiting embodiments or aspects, the computer system (500) may be used to implement a method for character recognition in an image (401) of a payment card (103). The computer system (500) may include a central processing unit (“CPU” or “processor”) (502). The processor (502) may include at least one data processor for executing program components for dynamic resource allocation at runtime. The processor (502) may include dedicated processing units, such as an integrated system (bus) controller, a memory management control unit, a floating-point unit, a graphics processing unit, a digital signal processing unit, etc.
[0091] The processor (502) may be configured to communicate with one or more I / O devices (not shown) via an input / output (I / O) interface (501). The I / O interface (501) may employ communication protocols / methods, such as, but not limited to, audio, analog, digital, mono, RCA, stereo, IEEE-1394, serial bus, Universal Serial Bus (USB), infrared, PS / 2, BNC, coaxial, component, composite, digital video interface (DVI), high-definition multimedia interface (HDMI), RF antenna, S-Video, VGA, IEEE 802.1n / b / g / n / x, Cellular (e.g., Code Division Multiple Access (CDMA), High-Speed Packet Access (HSPA+), Global System for Mobile Communications (GSM), Long Term Evolution (LTE)). etc.
[0092] Using the I / O interface (501), the computer system (500) can communicate with one or more I / O devices. For example, input devices (510) can be antennas, keyboards, mice, joysticks, (infrared) remote controls, cameras, card readers, fax machines, dongles, biometric readers, microphones, touchscreens, touchpads, trackballs, styluses, scanners, storage devices, transceivers, video devices / sources, etc. Output devices (511) can be printers, fax machines, video displays (e.g., cathode ray tube (CRT), liquid crystal displays (LCD), light-emitting diodes (LEDs), plasma displays, plasma display panels (PDP), organic light-emitting diode displays (OLEDs), etc.), audio speakers, etc.
[0093] In some non-limiting embodiments or aspects, the computer system (500) is connected to a service provider via a communication network (509). The processor (502) may be configured to communicate with the communication network (509) via a network interface (503). The network interface (503) may communicate with the communication network (509). The network interface (503) may use connection protocols, including but not limited to direct connection, Ethernet (e.g., twisted pair 10 / 100 / 1000Base T), Transmission Control Protocol / Internet Protocol (TCP / IP), Token Ring, IEEE 802.11a / b / g / n / x, etc. The communication network (509) may include, but is not limited to, direct interconnect, e-commerce networks, peer-to-peer (P2P) networks, local area networks (LANs), wide area networks (WANs), wireless networks (e.g., using Wireless Application Protocol), the Internet, etc. Using a network interface (503) and a communication network (509), the computer system (500) can communicate with one or more service providers.
[0094] In some non-limiting embodiments or aspects, the processor (502) may be arranged to communicate with the memory (505) via a storage interface (504) (e.g., Figure 5 (RAM, ROM, etc., not shown) communication. The storage interface (504) can be connected to a memory (505), including but not limited to memory drives, removable optical disc drives, etc., using connection protocols such as Serial Advanced Technology Attachment (SATA), Integrated Electronic Drive (IDE), IEEE-1394, Universal Serial Bus (USB), Fibre Channel, Small Computer System Interface (SCSI), etc. The memory drive may also include drums, disk drives, magneto-optical drives, optical disc drives, redundant arrays of independent optical discs (RAID), solid-state storage devices, solid-state drives, etc.
[0095] The memory (505) may store a series of program or database components, including but not limited to a user interface (506), an operating system (507), a network server (508), etc. In some non-limiting embodiments or aspects, the computer system (500) may store user / application data, such as data, variables, records, etc., as described in this disclosure. Such a database may be implemented as a fault-tolerant, relational, scalable, and secure database, such as Oracle or Sybase.
[0096] An operating system (507) facilitates resource management and operation of a computer system (500). Examples of operating systems include, but are not limited to, those mentioned above. OS Similar to UNIX system distributions (e.g., BERKELEY SOFTWARE) (BSD) OPENBSD, etc. Distirizations (e.g., RED) wait), ( (7 / 8, 10, etc.) GOOGLE™ ANDROID™ OS, etc.
[0097] In some non-limiting embodiments or aspects, the computer system (500) may implement a program component stored in a web browser (not shown). The web browser (not shown) may be a hypertext viewing application, such as... INTERNET GOOGLE™ CHROME™ Secure web browsing can be provided using protocols such as Hypertext Transfer Protocol Secure (HTTPS), Secure Sockets Layer (SSL), and Transport Layer Security (TLS). Web browsers can use technologies such as AJAX, DHTML, etc. Tools such as application programming interfaces (APIs). In some non-limiting embodiments or aspects, the computer system (500) may implement program components stored in a mail server (not shown). The mail server may be an Internet mail server, for example... The mail server (not shown in the diagram) can use, for example, Dynamic Server Pages (ASP), C++ / C# NET, CGI SCRIPTS PHP Tools such as Internet Message Access Protocol (IMAP) and Messaging Application Programming Interface (MAPI) can be used by mail servers. Communication protocols such as Exchange, Post Office Protocol (POP), and Simple Mail Transfer Protocol (SMTP) are used. In some non-limiting embodiments or aspects, the computer system (500) may implement a program component stored in an email client (not shown). The email client (not shown) may be an email viewing application, such as... MAIL wait.
[0098] Furthermore, embodiments consistent with this disclosure may be implemented using one or more computer-readable storage media. A computer-readable storage medium refers to any type of physical memory that can store information or data readable by a processor. Therefore, a computer-readable storage medium can store instructions executable by one or more processors, including instructions that cause the processor to perform steps or stages consistent with the embodiments described herein. The term "computer-readable medium" should be understood to include tangible items and exclude carrier waves and transient signals, such as non-transient signals. Examples include random access memory (RAM), read-only memory (ROM), volatile memory, non-volatile memory, hard disk drives, optical disc (CD) ROMs, digital video discs (DVDs), flash drives, magnetic disks, and any other known physical storage media.
[0099] In some non-limiting embodiments or aspects, the computer system (500) may receive, via a communication network (509), at least one of an image (401) of a payment card (103) and one or more details (402) associated with the payment card (103) from a remote device (512).
[0100] Unless otherwise expressly specified, the terms “an embodiment”, “embodiment”, “embodiments”, “the embodiment”, “the embodiments”, “one or more embodiments”, “some non-limiting embodiments or aspects” and “one embodiment” mean “one or more (but not all) embodiments of this disclosure”.
[0101] The description of embodiments having several components communicating with each other does not imply that all of these components are required. Rather, various optional components are described to illustrate various possible embodiments of this disclosure.
[0102] Unless otherwise expressly specified, the terms "including / comprising," "having," and variations thereof mean "including, but not limited to." Unless otherwise expressly specified, the enumerated list of items does not imply that any or all items are mutually exclusive. Unless otherwise expressly specified, the terms "a / an" and "the" mean "one or more." The description of some non-limiting embodiments or aspects having several components communicating with each other does not imply that all of these components are required. Rather, various optional components are described to illustrate various possible embodiments of this disclosure.
[0103] Figure 3 The operations illustrated show certain events occurring in a particular order. In alternative embodiments, some operations may be performed, modified, or removed in a different order. Furthermore, steps may be added to the logic described above, and these steps still conform to the described embodiments. Additionally, the operations described herein may be performed sequentially, or some operations may be processed in parallel. However, operations may be performed by a single processing unit or distributed processing units.
[0104] Finally, the language used in this specification has been chosen primarily for readability and edibility purposes, and not for defining or limiting the subject matter of the invention. Therefore, it is intended that the scope of this disclosure be limited not by this detailed description, but by any claims relating to applications based on this disclosure. Thus, the disclosure of embodiments of this disclosure is intended to be illustrative, and not to limit the scope of the disclosure as set forth in the appended claims.
[0105] While various aspects and embodiments have been disclosed herein, other aspects and embodiments will be apparent to those skilled in the art. The aspects and embodiments disclosed herein are for illustrative purposes and are not intended to be limiting, wherein the true scope and spirit are indicated by the appended claims.
Claims
1. A computer-implemented method for recognizing payment card characters, comprising: The character recognition system receives an image of a payment card and one or more details associated with the payment card, wherein the payment card includes multiple characters, and wherein the one or more details include at least one of the following: the size of the payment card, the spatial location of the one or more regions of interest (ROIs), the presence and spatial location of a microchip, and the presence and spatial location of a logo; The character recognition system determines the derivative of the image based on the one or more detailed information details. The determination process includes: rotating the image of the payment card using the one or more detailed information details to place the payment card in a landscape mode, wherein the image of the payment card is represented as a first matrix of pixel values having multiple rows and multiple columns, these pixel values indicating the resolution of the image, and wherein the process of determining the derivative includes: Calculate the convolution between the pixel values in the first matrix and the filter values of the kernel, the kernel being represented by a second matrix, and the convolution produces a derivative, which is represented by a third matrix of pixel values; The character recognition system determines the horizontal sum of pixel values by summing the pixel values of one or more rows in a third matrix. The character recognition system identifies one or more ROIs in the image by comparing each of the horizontal sums of pixel values with a predefined first threshold, wherein when the horizontal sum of pixel values is greater than the predefined first threshold, it is determined that one or more characters exist in one or more rows, and when the horizontal sum of pixel values is less than the predefined first threshold, it is determined that one or more characters do not exist in one or more rows. The character recognition system extracts one or more characters from the plurality of characters in the identified one or more ROIs using one or more peaks in the histogram representing pixel values of the one or more ROIs; and The character recognition system uses trained artificial intelligence (AI) technology to identify each of the one or more characters extracted from the one or more ROIs.
2. The method of claim 1, wherein the horizontal sum of pixel values is calculated for one or more rows of the plurality of rows in the image from the top portion of the image to the bottom portion of the image.
3. The method of claim 1, wherein the level of pixel values greater than the predefined first threshold indicates the presence of one or more characters in one or more rows, and the level of pixel values less than the predefined first threshold indicates the absence of one or more characters in one or more rows.
4. The method of claim 1, wherein each of the one or more ROIs comprises one or more rows of the image in the plurality of rows, wherein the one or more rows comprise the one or more characters.
5. The method of claim 1, wherein extracting the one or more characters comprises: The one or more peaks are selected in descending order based on the magnitude of the peaks in the histogram; Determine the vertical sum of pixel values adjacent to one or more selected peaks and compare it with a predefined second threshold; as well as Based on the comparison with the predefined second threshold, one or more columns that are adjacent to the selected one or more peaks are aggregated.
6. The method of claim 5, wherein the vertical sum of pixel values is determined by adding the pixel values in one or more columns of columns adjacent to the selected one or more peaks in the image within the one or more ROIs.
7. The method of claim 1, wherein the trained AI technology is a trained deep learning algorithm based on a convolutional neural network.
8. The method of claim 1, wherein training the AI technology comprises: Multiple characters are provided as input to the AI technology, wherein the desired output of the AI technology for the multiple characters is known; Compare the output of the AI technology with the desired output; and Based on the comparison, supervised learning techniques are used to adjust one or more parameters of the AI technology.
9. A character recognition system for recognizing characters on payment cards, comprising: processor; as well as A memory communicatively coupled to the processor, wherein the memory stores processor instructions that, when executed, cause the processor to: Receive an image of a payment card and one or more details associated with the payment card, wherein the payment card includes multiple characters, and wherein the one or more details include at least one of the following: the size of the payment card, the spatial location of the one or more regions of interest (ROIs), the presence and spatial location of a microchip, and the presence and spatial location of a logo; Determining the derivative of the image based on the one or more detailed information, the determination process includes: rotating the image of the payment card using the one or more detailed information to place the payment card in landscape mode, wherein the image of the payment card is represented as a first matrix of pixel values having multiple rows and multiple columns, these pixel values indicating the resolution of the image, and wherein the process of determining the derivative includes: Calculate the convolution between the pixel values in the first matrix and the filter values of the kernel, the kernel being represented by a second matrix, and the convolution produces a derivative, which is represented by a third matrix of pixel values; The horizontal sum of pixel values is determined by summing the pixel values of one or more rows in the third matrix. One or more ROIs are identified in the image by comparing each of the horizontal sums of the pixel values with a predefined first threshold, wherein when the horizontal sum of the pixel values is greater than the predefined first threshold, it is determined that one or more characters exist in one or more rows, and when the horizontal sum of the pixel values is less than the predefined first threshold, it is determined that one or more characters do not exist in one or more rows. Extract one or more characters from the plurality of characters in the identified one or more ROIs using one or more peaks in the histogram representing pixel values of the one or more ROIs; and Use trained artificial intelligence (AI) technology to identify each of the one or more characters extracted from the one or more ROIs.
10. The character recognition system of claim 9, wherein the processor is configured to calculate the horizontal sum of pixel values for one or more of the plurality of rows in the image, from the top portion to the bottom portion of the image.
11. The character recognition system of claim 9, wherein the processor is configured to determine that one or more characters exist in one or more rows when the horizontal sum of pixel values is greater than the predefined first threshold, and to determine that one or more characters do not exist in one or more rows when the horizontal sum of pixel values is less than the predefined first threshold.
12. The character recognition system of claim 9, wherein the processor is configured to extract the one or more characters by: The one or more peaks are selected in descending order based on the magnitude of the peaks in the histogram; Determine the vertical sum of pixel values adjacent to one or more selected peaks and compare it with a predefined second threshold; as well as Based on the comparison with the predefined second threshold, one or more columns that are adjacent to the selected one or more peaks are aggregated.
13. The character recognition system of claim 12, wherein the processor is configured to determine the vertical sum of pixel values by adding the pixel values of one or more columns of columns adjacent to the selected one or more peaks in the image within the one or more ROIs.
14. The character recognition system of claim 9, wherein the processor is configured to train the AI technology by: Multiple characters are provided as input to the AI technology, wherein the desired output of the AI technology for the multiple characters is known; Compare the output of the AI technology with the desired output; and Based on the comparison, supervised learning techniques are used to adjust one or more parameters of the AI technology.
Citation Information
Patent Citations
Method and apparatus for character string recognition
US20080240582A1