CN112801165B - Card auditing method and device - Google Patents

Card auditing method and device Download PDF

Info

Publication number
CN112801165B
CN112801165B CN202110090570.4A CN202110090570A CN112801165B CN 112801165 B CN112801165 B CN 112801165B CN 202110090570 A CN202110090570 A CN 202110090570A CN 112801165 B CN112801165 B CN 112801165B
Authority
CN
China
Prior art keywords
image
card
detected
determining
checked
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110090570.4A
Other languages
Chinese (zh)
Other versions
CN112801165A (en
Inventor
程栋
周雍恺
赵庆杭
刘国宝
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Unionpay Co Ltd
Original Assignee
China Unionpay 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 China Unionpay Co Ltd filed Critical China Unionpay Co Ltd
Priority to CN202110090570.4A priority Critical patent/CN112801165B/en
Publication of CN112801165A publication Critical patent/CN112801165A/en
Application granted granted Critical
Publication of CN112801165B publication Critical patent/CN112801165B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/02Banking, e.g. interest calculation or account maintenance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • G06V10/443Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by matching or filtering

Abstract

The embodiment of the invention provides a card auditing method and device, wherein the method comprises the following steps: the method comprises the steps of obtaining characteristic information of each element in an image to be detected, wherein the image to be detected is obtained by collecting an image of a card to be checked or a card surface design image of the card to be checked provided by a sender, the characteristic information comprises size information and position information, constructing a standard image corresponding to the card type of the card to be checked, and determining checking results of the card to be checked according to the characteristic information of each element in the standard image and the characteristic information of each element in the image to be detected.

Description

Card auditing method and device
Technical Field
The application relates to the technical field of card auditing, in particular to a card auditing method and device.
Background
With the development and maturity of the bank card industry, various types of physical card designs are endlessly developed. In the current popularization flow, the card face design submitted by each card issuing bank is mainly audited in a manual audit mode, but the manual audit efficiency is lower.
In order to improve the auditing efficiency, a machine vision algorithm which is possibly used at present mainly recognizes semantic information such as a card number and characters of a bank card, but does not relate to how to recognize non-semantic information such as size information of the bank card and standard position information of each element on a card surface.
Therefore, there is a need for a card auditing method that can realize auditing of non-semantic information on a card.
Disclosure of Invention
The embodiment of the invention provides a card auditing method and device, which can realize auditing of non-semantic information on a card and improve accuracy of card auditing.
In a first aspect, an embodiment of the present invention provides a card auditing method, including:
acquiring characteristic information of each element in an image to be detected; the image to be detected is obtained by collecting an image of the card to be checked or a card surface design image of the card to be checked provided by a sender; the feature information includes size information and position information;
constructing a standard image corresponding to the card type of the card to be audited;
and determining the auditing result of the card to be audited according to the characteristic information of each element in the standard image and the characteristic information of each element in the image to be detected.
According to the method, the characteristic information of each element in the image to be inspected is obtained, wherein the characteristic information comprises the size information and the position information, the standard image corresponding to the card type of the card to be inspected is constructed, and then the inspection result of the card to be inspected is determined according to the characteristic information of each element in the standard image and the characteristic information of each element in the image to be inspected, so that the non-semantic information such as the size information and the position information of the card to be inspected can be inspected, and the improvement of the inspection accuracy is facilitated.
Optionally, constructing a standard image corresponding to the type of the card to be checked, including:
acquiring element images of a first element of each template from N templates included in a template library; the N is an integer greater than 1;
for the element image of the first element of each of the N templates, performing: matching the element image with the image to be detected to obtain a first area with highest matching degree with the element image in the image to be detected; each template corresponds to a first area, and each first area corresponds to a matching value;
determining a first region with the largest matching value from N first regions;
and taking the first area with the largest matching value as a positioning anchor point, and constructing a standard image corresponding to the type of the card to be checked according to the type of the card to be checked and the characteristic information of the first area with the largest matching value.
According to the method, the position information and the size information of the first element in the template of each card type are fixed, and the position of the first element in the image to be detected can be accurately positioned by matching the element image of the first element in the template with the image to be detected, so that a standard image suitable for verifying the detection data of the card to be checked is constructed, and the checking accuracy is improved.
Optionally, matching the element image with the image to be detected to obtain a first area with the highest matching degree with the element image in the image to be detected, including:
taking the minimum circumscribed rectangle of the element image as a sliding window, traversing all areas in the image to be detected, and obtaining an area with highest matching degree with the characteristic information of the minimum circumscribed rectangle;
and determining the region with the highest matching degree with the feature information of the smallest circumscribed rectangle as a first region with the highest matching degree with the element image in the image to be detected.
According to the method, the minimum circumscribed rectangle of the element image is used as the sliding window, all the areas in the image to be detected are traversed, and the area with the highest matching degree with the element image in the image to be detected can be obtained rapidly.
Optionally, acquiring feature information of each element in the image to be detected includes:
processing the image to be detected to obtain a gray image;
determining characteristic information of a block area in an image to be detected according to gray values of all pixel points in the long axis direction and gray values of all pixel points in the short axis direction in the gray image;
and detecting the contour line in the image to be detected to obtain the characteristic information of the contour line of the card to be checked.
In the method, the elements in the image to be detected are mainly block areas and contour lines, and the characteristic information of the elements in the image to be detected can be accurately obtained by detecting the block areas and the contour lines.
Optionally, determining the auditing result of the card to be audited according to the feature information of each element in the standard image and the feature information of each element in the image to be detected includes:
for each element in the standard image, performing:
determining the proportion deviation of the elements according to the size information of the elements in the standard image and the size information of the elements in the image to be detected;
determining the position deviation of the element according to the position information of the element in the standard image and the position information of the element in the image to be detected;
and determining the auditing result of the card to be audited according to the proportion deviation of each element and the position deviation of each element.
According to the method, the auditing result of the card to be audited can be determined in a quantitative mode by determining the proportion deviation of each element and the position deviation of each element.
Optionally, determining the auditing result of the card to be audited according to the proportion deviation of each element and the position deviation of each element includes:
if the proportion deviation of each element is smaller than the first threshold value and the position deviation of each element is smaller than the second threshold value, determining that the card to be audited passes the audit.
Optionally, determining the auditing result of the card to be audited according to the proportion deviation of each element and the position deviation of each element includes:
determining the total deviation of the image to be detected and the standard image according to the deviation of each element and the weight coefficient corresponding to each element;
and if the total deviation is smaller than a third threshold value, determining that the card to be audited passes the audit.
In a second aspect, an embodiment of the present invention provides a card auditing apparatus, including:
the acquisition module is used for acquiring the characteristic information of each element in the image to be detected; the image to be detected is obtained by collecting an image of the card to be checked or a card surface design image of the card to be checked provided by a sender; the characteristic information comprises size information and position information;
the construction module is used for constructing a standard image corresponding to the type of the card to be checked;
and the determining module is used for determining the auditing result of the card to be audited according to the characteristic information of each element in the standard image and the characteristic information of each element in the image to be detected.
In a third aspect, embodiments of the present application further provide a computing device, including: a memory for storing a program; a processor for calling a program stored in said memory, and executing the method as described in the various possible designs of the first aspect according to the obtained program.
In a fourth aspect, embodiments of the present application also provide a computer-readable non-volatile storage medium, including a computer-readable program, which when read and executed by a computer, causes the computer to perform the method as described in the various possible designs of the first aspect.
These and other implementations of the present application will be more readily understood in the following description of the embodiments.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it will be apparent that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a card auditing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a minimum bounding rectangle provided by an embodiment of the present invention;
fig. 3 is a schematic diagram of standard construction of a bank card in a rectangular coordinate system according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a bank card according to an embodiment of the present invention in a rectangular coordinate system;
FIG. 5 is a diagram of a histogram detection result provided in an embodiment of the present invention;
FIG. 6 is a schematic diagram of a line to be tested according to an embodiment of the present invention;
fig. 7 is a schematic diagram of hough transform according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of a card profile according to an embodiment of the present invention;
fig. 9 is a schematic diagram of a card auditing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The word "exemplary" is used hereinafter to mean "serving as an example, embodiment, or illustration. Any embodiment described as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
The terms "first," "second," and the like herein are used for descriptive purposes only and are not to be construed as either explicit or implicit relative importance or to indicate the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature, and in the description of embodiments of the invention, unless otherwise indicated, the meaning of "a plurality" is two or more. Furthermore, the term "include" and any variations thereof is intended to cover non-exclusive protection. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
Some terms in the embodiments of the present invention are explained below to facilitate understanding by those skilled in the art.
Minimum circumscribed rectangle: refers to the largest extent of a number of two-dimensional shapes (e.g., points, lines, polygons) represented in two-dimensional coordinates, i.e., a rectangle that defines a lower boundary in the largest abscissa, smallest abscissa, largest ordinate, and smallest ordinate of each vertex of a given two-dimensional shape. Such a rectangle contains a given two-dimensional shape with sides parallel to the coordinate axes. The minimum bounding rectangle is a two-dimensional form of the minimum bounding box (minimum bounding box).
And (3) pixel points: refers to a minimum unit, also called a pixel, in an image represented by a sequence of numbers. A pixel is an indivisible unit or element in the entire image. Each dot matrix image contains a certain number of pixels that determine the size of the image presented on the screen. A picture is made up of many pixels. For example, the picture size is 500×338, which means that the picture is formed by a matrix of 500×338 pixels, the width of the picture is 500 pixels long, the height is 338 pixels long, and 500×338= 149000 pixels total. The mouse is placed over a picture and the size, here pixels, is displayed.
In order to solve the technical problems in the related art, the embodiment of the invention provides a card auditing method and device. The card auditing method provided by the embodiment of the invention can be applied to a bank card identification scene, a newly designed bank card auditing scene and the like.
FIG. 1 shows a flow chart of a card auditing method provided by an embodiment of the present invention. The card auditing method can be performed by a card auditing apparatus, as shown in fig. 1, and comprises the following steps:
step 101, obtaining characteristic information of each element in an image to be detected.
The image to be detected is obtained by collecting an image of the card to be checked or a card surface design image of the card to be checked provided by the sender, and in specific implementation, the image of any one of the front surface and the back surface of the card to be checked can be collected, or the image of the front surface and the back surface can be collected.
In the embodiment of the present invention, the card to be checked may include, but is not limited to, a bank card, a shopping card, and the like, and the card to be checked is hereinafter described as an example of the bank card. Exemplary, the bank card includes, but is not limited to, the following elements: chip, magnetic stripe, card number, name, card expiration date, unionpay logo, card issuing bank name, card contour line, etc.
In step 101, the feature information includes size information and position information, and the image to be detected is placed under a rectangular coordinate system XOY, and the position information of the element may be represented by using the position coordinates of the element on the image to be detected, for example, by using the coordinates of the upper left corner of the element on the image to be detected. The size information of an element may be represented by the length of the element in the X-axis and the length in the Y-axis.
If the shape of the element is not a rectangle, for example, the element is a rounded rectangle, and for example, the element is a parallelogram, the position information and the size information of the smallest circumscribed rectangle of the element may be employed as the feature information of the element. Taking the element as the silver logo as an example, as shown in fig. 2, the position information of the silver logo can be represented by the coordinates (x, y) of the point a at the left upper corner of the smallest circumscribed rectangle (the dotted rectangle box in fig. 2) of the silver logo. The size information of the element can be represented by the width of the minimum bounding rectangle (dashed rectangle in fig. 2) of the silver logo on the X-axis and the length height on the Y-axis. In this example, the characteristic information of the silver logo may be expressed as [ (x, y), width, height ].
And 102, constructing a standard image corresponding to the card type of the card to be audited.
And step 103, determining the auditing result of the card to be audited according to the characteristic information of each element in the standard image and the characteristic information of each element in the image to be detected.
It should be noted that, the steps 101 and 102 may be performed in no order, the step 101 may precede the step 102, or the step 101 may precede the step 102.
According to the method, the characteristic information of each element in the image to be inspected is obtained, wherein the characteristic information comprises the size information and the position information, the standard image corresponding to the card type of the card to be inspected is constructed, and then the inspection result of the card to be inspected is determined according to the characteristic information of each element in the standard image and the characteristic information of each element in the image to be inspected, so that the non-semantic information such as the size information and the position information of the card to be inspected can be inspected, and the improvement of the inspection accuracy is facilitated.
In a specific implementation, a template library is stored in the card auditing device, the template library can comprise templates of various card types, each card type corresponds to at least one template, the template library comprises N templates as an example, and N is an integer greater than 1. Each template comprises the standard of the position and the size of each element, and standard images corresponding to the corresponding card types can be manufactured according to the templates.
In the step 102, constructing a standard image corresponding to the type of the card to be checked includes: acquiring element images of a first element of each template from N templates included in a template library; for the element image of the first element of each of the N templates, performing: matching the element image with the image to be detected to obtain a first area with highest matching degree with the element image in the image to be detected; each template corresponds to a first area, and each first area corresponds to a matching value. Determining a first region with the largest matching value from N first regions; and taking the first area with the largest matching value as a positioning anchor point, and constructing a standard image corresponding to the type of the card to be checked according to the type of the card to be checked and the characteristic information of the first area with the largest matching value.
In this embodiment of the present application, the first element may be an element that selects, from templates of respective card types, that has relatively fixed position information and size information, for example, an association logo on a bank card.
In a specific implementation, taking the first element as an example of the silver Logo, the silver Logo Image may be obtained by capturing an Image from an existing standard Logo Image, for example, named Image1, and the resolution is selected to be 600×800. Meanwhile, an interpolation method of an Image pyramid (such as a Gaussian pyramid) can be used for scaling the Image1 so as to match each region in the Image to be detected in the dimension of the size, and the multiples are respectively 1/4 times, 1 time and 4 times. Since the gaussian kernel is a linear kernel, blurring an image using a gaussian pyramid or the like does not introduce other noise. In other embodiments, a linear interpolation approach may be used to increase the computational speed relative to the difference approach of the image pyramid.
In one example, taking an image to be detected as a bank card image, taking an element image of a first element as a bank card image as an example, taking an N value as an example, acquiring the bank logo image from each of 10 templates, thus acquiring N bank logo images such as a bank logo image corresponding to the template 1, a bank logo image corresponding to the template 2, a … … silver logo image corresponding to the template N and the like, matching each bank logo image with the bank card image, taking matching the bank logo image corresponding to the template 1 with the bank card image as an example, wherein a plurality of areas exist in the bank card image, matching all areas on the bank card image with the bank logo image corresponding to the template 1, and determining the area with the highest matching degree of the bank logo image corresponding to the template 1, namely the first area, from the matching result, and simultaneously obtaining the matching value of the bank logo image corresponding to the template 1 and the first area. And by analogy, obtaining a first area with highest matching degree of the silver logo image corresponding to the template n and a matching value of the silver logo image corresponding to the template n and the first area, wherein n is 2 to 10 times. From the 10 obtained first areas, the first area with the largest matching value is determined, and the first area with the largest matching value can be regarded as the area where the first element in the image to be detected is located. And then, taking the first area with the largest matching value as a positioning anchor point, and constructing a standard image corresponding to the type of the card to be checked according to the type of the card to be checked and the characteristic information of the first area with the largest matching value.
According to the method, the element image of the first element in the template is matched with the image to be detected, so that the position of the first element in the image to be detected can be accurately positioned, a standard image suitable for verifying the detection data of the card to be checked is constructed, and the checking accuracy is improved.
Based on the above embodiment, matching the element image with the image to be detected to obtain a first area with the highest matching degree with the element image in the image to be detected, including: taking the minimum circumscribed rectangle of the element image as a sliding window, traversing all areas in the image to be detected, and obtaining an area with highest matching degree with the characteristic information of the minimum circumscribed rectangle; and determining the region with the highest matching degree with the feature information of the smallest circumscribed rectangle as a first region with the highest matching degree with the element image in the image to be detected.
For example, the first element is a silver logo, the element image is a silver logo image, and a minimum circumscribed rectangle of the silver logo image is used as a sliding window to traverse on the bank card image, so that an area with the highest matching degree with the minimum circumscribed rectangle can be obtained, the minimum circumscribed rectangle is taken as an example of a dotted rectangle frame in fig. 2, and thus the first area can be an area where the silver logo in fig. 2 is located. Then, the coordinates and size information of the standard image to be reached by the type of the card to be checked are determined using the type of the card to be checked, the coordinate information (x, y) of the a point, and the size information [ width, height ]. As shown in fig. 3, the first area is used as a positioning anchor point, that is, the silver logo is used as a positioning anchor point, and each element of the bank card is reconstructed according to the coordinate and size information of the standard image to be achieved, so that the standard image corresponding to the type of the card to be audited is constructed.
According to the method, the minimum circumscribed rectangle of the element image is used as the sliding window, all the areas in the image to be detected are traversed, and the area with the highest matching degree with the element image in the image to be detected can be obtained rapidly.
In the specific implementation process, in step 102, obtaining feature information of each element in the image to be detected includes: processing the image to be detected to obtain a gray image; determining characteristic information of a block area in an image to be detected according to gray values of all pixel points in the long axis direction and gray values of all pixel points in the short axis direction in the gray image; and detecting the contour line in the image to be detected to obtain the characteristic information of the contour line of the card to be checked.
The processing of the image to be detected may include graying the image to be detected to obtain a gray image. Optionally, a gaussian filtering operation may be performed on the image to be detected, so as to remove a portion of the interference pixels in the image to be detected.
Then, the block region may be detected using a histogram detection method. Taking the image to be detected as a bank card image as an example, as shown in fig. 4, the bank card image is placed under a rectangular coordinate system XOY, and the long axis direction can be the X axis direction in fig. 4, and the short axis direction can be the Y axis direction in fig. 4. It should be noted that, the length of the bank card in the X-axis direction may be regarded as width, and the length of the bank card in the Y-axis direction may be regarded as height.
Drawing a curve of Sum function of pixel values of each pixel point of the bank card image in the Y-axis direction, namely drawing a curve of Sum function of pixel values of each pixel point in the Y-axis direction, as shown in a histogram detection result shown in fig. 5, wherein the numerical value on the X-axis in fig. 5 represents a size range 0-260 of the bank card image in the Y-axis direction in fig. 4, and the numerical value on the Y-axis in fig. 5 represents a Sum of gray values corresponding to any value in the size range. From the values projected onto the X-axis from the start and end points of the peak values taken in FIG. 5, the position and height values of the bank card magnetic stripe in FIG. 4 on the Y-axis can be determined.
Similarly, a curve of Sum function of pixel values of each pixel point of the bank card image in the X-axis direction is drawn, and then the position and width value of the bank card magnetic stripe in the X-axis in FIG. 4 can be determined.
By way of the above example, the characteristic information of the block-shaped region of the image to be detected can be obtained.
For the size of the bank card, the Hough straight line detection method can be used for determining, and the Hough transformation algorithm searches for a target with a specific shape in the image through a voting algorithm. The Hough transform algorithm obtains a set conforming to the specific shape in a parameter space by calculating the local maximum value of the accumulated result as the Hough transform result. When it is desired to detect straight lines, in order to generally represent all straight lines, a polar coordinate system is used, so that each point on the polar coordinate system representation will be a series of sinusoids of different initial phases, amplitudes, and periods, and the intersection of all sinusoids will represent this straight line in the x-y space. For example, after hough transform is performed on the white straight line in fig. 6, an image as shown in fig. 7 is obtained, where the intersection point is the calibrated white straight line in fig. 6.
As shown in fig. 8, after detecting the contour line of the bank card by using the hough transform algorithm, we lengthen the longest line to obtain the intersection point, and confirm the position information by the coordinate position of the intersection point.
By the method, the measurement of regular patterns such as the sizes of the cards, chips, magnetic stripes, contour lines and the like on the images to be detected can be completed, and the characteristic information of each element of the real cards to be checked is obtained.
In the method, the elements in the image to be detected are mainly block areas and contour lines, and the characteristic information of the elements in the image to be detected can be accurately obtained by detecting the block areas and the contour lines.
In the specific implementation process, in step 103, determining an auditing result of the card to be audited according to the feature information of each element in the standard image and the feature information of each element in the image to be detected includes: for each element in the standard image, performing: determining the proportion deviation of the elements according to the size information of the elements in the standard image and the size information of the elements in the image to be detected; determining the position deviation of the element according to the position information of the element in the standard image and the position information of the element in the image to be detected; and determining the auditing result of the card to be audited according to the proportion deviation of each element and the position deviation of each element.
According to the method, the auditing result of the card to be audited can be determined in a quantitative mode by determining the proportion deviation of each element and the position deviation of each element.
Based on the above embodiment, the auditing result of the card to be audited is determined according to the proportion deviation of each element and the position deviation of each element, and various implementation manners are possible.
As one possible implementation manner, if the proportion deviation of each element is smaller than the first threshold value and the position deviation of each element is smaller than the second threshold value, determining that the card to be audited passes the audit. And if the proportion deviation of each element is greater than or equal to a first threshold value, or the position deviation of each element is greater than or equal to a second threshold value, determining that the card to be checked does not pass the check.
For example, each element measures the coordinate deviation in the form of a minimum circumscribed rectangle, the corresponding characteristic information of each element in the image to be detected is [ (X, Y), W, H ], and the characteristic information of each element in the standard image is [ (X, Y), W, H ]. The calculation of the deviation value between the two mainly includes two parts, namely, the deviation of the dimension center point (i.e., the coordinate point of the upper left corner of the minimum bounding rectangle) and the deviation of the dimension ratio. The deviation of the center point is directly carried out according to the Manhattan distance, and the deviation of the size proportion is taken as the average value of the difference value of the two.
The deviation for each element is defined as: position deviation and proportion deviation, wherein the position deviation is |x-X|, |y-Y|, and the proportion deviation is W/H-W/H. Any one of the three deviation values of I X-X I, I Y-Y I and W/H-W/H is larger than 0, the deviation value P is set to 0, otherwise, the deviation value P is set to 1, and therefore verification feedback can be obtained when the position and the proportion of the element on the graph deviate.
As another possible implementation manner, determining the total deviation of the image to be detected and the standard image according to the deviation of each element and the weight coefficient corresponding to each element; and if the total deviation is smaller than a third threshold value, determining that the card to be audited passes the audit. And if the total deviation is greater than or equal to a third threshold value, determining that the card to be checked does not pass the check.
Taking four elements of an image to be detected, including a region chip, a Logo region, a card size and the like as examples, and respectively configuring different weights for the four elements according to different card types. As an example, depending on the card type, the value of w may take the form of 0 and 1, with 1 being set if the current card type is designed with the element, and 0 otherwise.
Illustratively, the deviations of the four elements are set as: the chip area deviation P1, logo area deviation P2, the caliper deviation P3 and the caliper deviation P4 have weights corresponding to w_1, w_2, w_3 and w_4 respectively, and the total deviation is calculated as p=w_1×p1+w_2×p2+w_3×p3+w_4×p4.
According to the method, the auditing result of the card to be audited can be determined in a quantitative mode by determining the proportion deviation of each element and the position deviation of each element.
The following is an embodiment of the device according to the present invention, and for details of the device embodiment that are not described in detail, reference may be made to the above-described one-to-one embodiment of the method.
Based on the same concept, an embodiment of the present invention provides a card auditing device, and fig. 9 is a schematic diagram of the card auditing device provided in the embodiment of the present application, as shown in fig. 9, including:
an acquisition module 901, configured to acquire feature information of each element in an image to be detected; the image to be detected is obtained by collecting an image of the card to be checked or a card surface design image of the card to be checked provided by a sender; the feature information includes size information and position information;
the construction module 902 is configured to construct a standard image corresponding to a card type of the card to be checked;
the determining module 903 is configured to determine an auditing result of the card to be audited according to the feature information of each element in the standard image and the feature information of each element in the image to be detected.
Optionally, the construction module 902 is specifically configured to:
acquiring element images of a first element of each template from N templates included in a template library; n is an integer greater than 1;
for the element image of the first element of each of the N templates, performing: matching the element image with the image to be detected to obtain a first area with highest matching degree with the element image in the image to be detected; each template corresponds to a first area, and each first area corresponds to a matching value;
determining a first region with the largest matching value from N first regions;
and taking the first area with the largest matching value as a positioning anchor point, and constructing a standard image corresponding to the type of the card to be checked according to the type of the card to be checked and the characteristic information of the first area with the largest matching value.
Optionally, the construction module 902 is specifically configured to: taking the minimum circumscribed rectangle of the element image as a sliding window, traversing all areas in the image to be detected, and obtaining an area with highest matching degree with the characteristic information of the minimum circumscribed rectangle;
and determining the region with the highest matching degree with the feature information of the smallest circumscribed rectangle as a first region with the highest matching degree with the element image in the image to be detected.
Optionally, the acquiring module 901 is specifically configured to:
processing the image to be detected to obtain a gray image;
determining characteristic information of a block area in an image to be detected according to gray values of all pixel points in the long axis direction and gray values of all pixel points in the short axis direction in the gray image;
and detecting the contour line in the image to be detected to obtain the characteristic information of the contour line of the card to be checked.
Optionally, the determining module 903 is specifically configured to:
for each element in the standard image, performing:
determining the proportion deviation of the elements according to the size information of the elements in the standard image and the size information of the elements in the image to be detected;
determining the position deviation of the element according to the position information of the element in the standard image and the position information of the element in the image to be detected;
and determining the auditing result of the card to be audited according to the proportion deviation of each element and the position deviation of each element.
Optionally, the determining module 903 is specifically configured to:
if the proportion deviation of each element is smaller than the first threshold value and the position deviation of each element is smaller than the second threshold value, determining that the card to be audited passes the audit.
Optionally, the determining module 903 is specifically configured to:
determining the total deviation of the image to be detected and the standard image according to the deviation of each element and the weight coefficient corresponding to each element;
and if the total deviation is smaller than a third threshold value, determining that the card to be audited passes the audit.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (9)

1. A method of card auditing, comprising:
acquiring characteristic information of each element in an image to be detected; the image to be detected is obtained by collecting an image of the card to be checked or a card surface design image of the card to be checked provided by a sender; the characteristic information comprises size information and position information;
constructing a standard image corresponding to the card type of the card to be checked;
determining an auditing result of the card to be audited according to the characteristic information of each element in the standard image and the characteristic information of each element in the image to be detected;
the construction of the standard image corresponding to the type of the card to be audited comprises the following steps:
acquiring element images of a first element of each template from N templates included in a template library; the N is an integer greater than 1;
for the element image of the first element of each of the N templates, performing: matching the element image with the image to be detected to obtain a first area with highest matching degree with the element image in the image to be detected; each template corresponds to a first area, and each first area corresponds to a matching value;
determining a first region with the largest matching value from N first regions;
and constructing a standard image corresponding to the type of the card to be checked according to the type of the card to be checked and the characteristic information of the first area with the largest matching value by taking the first area with the largest matching value as a positioning anchor point.
2. The method according to claim 1, wherein the matching the element image with the image to be detected to obtain a first region with the highest matching degree with the element image in the image to be detected includes:
traversing all areas in the image to be detected by taking the minimum circumscribed rectangle of the element image as a sliding window to obtain an area with highest matching degree with the characteristic information of the minimum circumscribed rectangle;
and determining the region with the highest matching degree with the feature information of the minimum circumscribed rectangle as a first region with the highest matching degree with the element image in the image to be detected.
3. The method according to any one of claims 1-2, wherein the acquiring feature information of each element in the image to be detected includes:
processing the image to be detected to obtain a gray image;
determining characteristic information of a block area in the image to be detected according to the gray value of each pixel point in the long axis direction and the gray value of each pixel point in the short axis direction in the gray image;
and detecting the contour lines in the image to be detected to obtain the characteristic information of the contour lines of the card to be checked.
4. A method according to claim 3, wherein determining the result of the verification of the card to be verified based on the feature information of each element in the standard image and the feature information of each element in the image to be detected comprises:
for each element in the standard image, performing:
determining the proportion deviation of the elements according to the size information of the elements in the standard image and the size information of the elements in the image to be detected;
determining the position deviation of the element according to the position information of the element in the standard image and the position information of the element in the image to be detected;
and determining the auditing result of the card to be audited according to the proportion deviation of each element and the position deviation of each element.
5. The method of claim 4, wherein said determining the audit result of said card to be audited based on the ratio deviation of each of said elements and the position deviation of each of said elements comprises:
and if the proportion deviation of each element is smaller than a first threshold value and the position deviation of each element is smaller than a second threshold value, determining that the card to be checked passes the checking.
6. The method of claim 4, wherein said determining the audit result of said card to be audited based on the ratio deviation of each of said elements and the position deviation of each of said elements comprises:
determining the total deviation of the image to be detected and the standard image according to the deviation of each element and the weight coefficient corresponding to each element;
and if the total deviation is smaller than a third threshold value, determining that the card to be checked passes the check.
7. A card auditing device, comprising:
the acquisition module is used for acquiring the characteristic information of each element in the image to be detected; the image to be detected is obtained by collecting an image of the card to be checked or a card surface design image of the card to be checked provided by a sender; the characteristic information comprises size information and position information;
the construction module is used for constructing a standard image corresponding to the card type of the card to be checked;
the determining module is used for determining the auditing result of the card to be audited according to the characteristic information of each element in the standard image and the characteristic information of each element in the image to be detected;
the construction of the standard image corresponding to the type of the card to be audited comprises the following steps:
acquiring element images of a first element of each template from N templates included in a template library; the N is an integer greater than 1;
for the element image of the first element of each of the N templates, performing: matching the element image with the image to be detected to obtain a first area with highest matching degree with the element image in the image to be detected; each template corresponds to a first area, and each first area corresponds to a matching value;
determining a first region with the largest matching value from N first regions;
and constructing a standard image corresponding to the type of the card to be checked according to the type of the card to be checked and the characteristic information of the first area with the largest matching value by taking the first area with the largest matching value as a positioning anchor point.
8. A computer readable storage medium, characterized in that the computer readable storage medium stores a program which, when run on a computer, causes the computer to implement the method of any one of claims 1 to 6.
9. A computer device, comprising:
a memory for storing a computer program;
a processor for invoking a computer program stored in said memory, performing the method according to any of claims 1 to 6 in accordance with the obtained program.
CN202110090570.4A 2021-01-22 2021-01-22 Card auditing method and device Active CN112801165B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110090570.4A CN112801165B (en) 2021-01-22 2021-01-22 Card auditing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110090570.4A CN112801165B (en) 2021-01-22 2021-01-22 Card auditing method and device

Publications (2)

Publication Number Publication Date
CN112801165A CN112801165A (en) 2021-05-14
CN112801165B true CN112801165B (en) 2024-03-22

Family

ID=75811300

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110090570.4A Active CN112801165B (en) 2021-01-22 2021-01-22 Card auditing method and device

Country Status (1)

Country Link
CN (1) CN112801165B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113792267B (en) * 2021-08-09 2023-03-14 中国人民银行数字货币研究所 Method and device for checking digital copyright of card surface picture of payment mechanism
CN116242843A (en) * 2023-01-17 2023-06-09 深圳职业技术学院 Defect detection method, terminal and storage medium for paper box package

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19539801A1 (en) * 1995-10-26 1997-04-30 Ibm Security system for transactions with smart cards
KR101660476B1 (en) * 2015-11-19 2016-10-14 권해원 Metod for recognizing payment information in printed credit card
CN108510036A (en) * 2018-03-27 2018-09-07 武汉天喻信息产业股份有限公司 A kind of card face image generating method based on parametrization
CN110674818A (en) * 2019-12-03 2020-01-10 捷德(中国)信息科技有限公司 Card surface detection method, device, equipment and medium
CN110674819A (en) * 2019-12-03 2020-01-10 捷德(中国)信息科技有限公司 Card surface picture detection method, device, equipment and storage medium
CN111199240A (en) * 2018-11-16 2020-05-26 马上消费金融股份有限公司 Training method of bank card identification model, and bank card identification method and device
CN111415243A (en) * 2020-03-24 2020-07-14 支付宝(杭州)信息技术有限公司 Method and device for assisting international bank card audit

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11049372B2 (en) * 2007-06-13 2021-06-29 CPI Card Group—Colorado, Inc. System and methods for generating user interfaces for custom card design session

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19539801A1 (en) * 1995-10-26 1997-04-30 Ibm Security system for transactions with smart cards
KR101660476B1 (en) * 2015-11-19 2016-10-14 권해원 Metod for recognizing payment information in printed credit card
CN108510036A (en) * 2018-03-27 2018-09-07 武汉天喻信息产业股份有限公司 A kind of card face image generating method based on parametrization
CN111199240A (en) * 2018-11-16 2020-05-26 马上消费金融股份有限公司 Training method of bank card identification model, and bank card identification method and device
CN110674818A (en) * 2019-12-03 2020-01-10 捷德(中国)信息科技有限公司 Card surface detection method, device, equipment and medium
CN110674819A (en) * 2019-12-03 2020-01-10 捷德(中国)信息科技有限公司 Card surface picture detection method, device, equipment and storage medium
CN111415243A (en) * 2020-03-24 2020-07-14 支付宝(杭州)信息技术有限公司 Method and device for assisting international bank card audit

Also Published As

Publication number Publication date
CN112801165A (en) 2021-05-14

Similar Documents

Publication Publication Date Title
CN112801165B (en) Card auditing method and device
US20090245638A1 (en) Method And Apparatus For Region-Based Segmentation Image Processing Using Region Mapping
EP1944731A2 (en) Method and apparatus for detecting objects in an image
EP1693783A1 (en) Fast method of object detection by statistical template matching
CN105894521A (en) Sub-pixel edge detection method based on Gaussian fitting
CN111539238B (en) Two-dimensional code image restoration method and device, computer equipment and storage medium
CN111222507B (en) Automatic identification method for digital meter reading and computer readable storage medium
CN110288612B (en) Nameplate positioning and correcting method and device
JP3078166B2 (en) Object recognition method
Hua et al. Geodesic distance-weighted shape vector image diffusion
CN110135288B (en) Method and device for quickly checking electronic certificate
CN111223078B (en) Method for determining flaw level and storage medium
Herout et al. Real-Time Detection of Lines and Grids: By PClines and Other Approaches
US6813377B1 (en) Methods and apparatuses for generating a model of an object from an image of the object
CN112233104B (en) Real-time displacement field and strain field detection method, system, device and storage medium
US20220351532A1 (en) Method for detecting fraud in documents
Bogacz et al. Homogenization of 2d & 3d document formats for cuneiform script analysis
EP4131177A1 (en) Imaging system and method using a multi-layer model approach to provide robust object detection
US7379599B1 (en) Model based object recognition method using a texture engine
US11978197B2 (en) Inspection method for inspecting an object and machine vision system
CN107480710B (en) Feature point matching result processing method and device
CN115393172A (en) Method and equipment for extracting light stripe centers in real time based on GPU
JPWO2010113217A1 (en) Character recognition device and character recognition method
JPH08502376A (en) Confirming the authenticity of an entity
Mara Made in the humanities: Dual integral invariants for efficient edge detection

Legal Events

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