CN110070491A - Bank card picture antidote, device, equipment and storage medium - Google Patents

Bank card picture antidote, device, equipment and storage medium Download PDF

Info

Publication number
CN110070491A
CN110070491A CN201910206042.3A CN201910206042A CN110070491A CN 110070491 A CN110070491 A CN 110070491A CN 201910206042 A CN201910206042 A CN 201910206042A CN 110070491 A CN110070491 A CN 110070491A
Authority
CN
China
Prior art keywords
bank card
picture
card picture
characteristic point
matching
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910206042.3A
Other languages
Chinese (zh)
Inventor
杨军
洪明伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Urban Construction Technology Shenzhen Co Ltd
Original Assignee
Ping An Urban Construction Technology Shenzhen 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 Ping An Urban Construction Technology Shenzhen Co Ltd filed Critical Ping An Urban Construction Technology Shenzhen Co Ltd
Priority to CN201910206042.3A priority Critical patent/CN110070491A/en
Publication of CN110070491A publication Critical patent/CN110070491A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/60Rotation of whole images or parts thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/60Rotation of whole images or parts thereof
    • G06T3/608Rotation of whole images or parts thereof by skew deformation, e.g. two-pass or three-pass rotation

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Collating Specific Patterns (AREA)

Abstract

The present invention relates to image procossing, a kind of bank card picture antidote, device, equipment and storage medium are disclosed, this method comprises: the bank card graphic template for obtaining bank card picture and locally prestoring;Feature Points Matching is carried out to bank card picture according to bank card graphic template, and the transformation matrix between bank card graphic template and bank card picture is obtained according to matching result;Affine transformation is carried out to bank card picture further according to transformation matrix, target bank card picture after obtaining correction, since the present embodiment is to carry out Feature Points Matching to bank card picture according to pre-set bank card graphic template, then transformation matrix is constructed according to matching result, affine transformation is carried out to obtain the target bank card picture after correction to bank card picture further according to transformation matrix, it is corrected so as to the bank card picture to all kinds of shooting irregularities, ensure that the subsequent smooth extraction to bank card information.

Description

Bank card picture antidote, device, equipment and storage medium
Technical field
The present invention relates to technical field of image processing more particularly to a kind of bank card picture antidote, device, equipment and Storage medium.
Background technique
In internet area, online trading is usually associated with the typing of bank card information, such as user is answered by client The number for when buying commodity with program, needing to input corresponding bank card account to complete to pay, but being related to due to bank card number Word is more, and user tends to malfunction when being manually entered, and experience sense is relatively poor.Therefore, most of client is all at present Have the function of shoot typing bank card content information, and actually user by camera shooting bank card picture when, by It does not ensure that each picture taken is all normal morphology in the reason of bank card places inclination or device hardware, adopts Collect the picture obtained and in most cases all has certain tilt angle, even stand upside down or corner missing, for this Class shoots irregularity bank card picture, and the prior art is usually to use the modes such as binaryzation, expansion process to carry out content to it Information extraction, but the problem of due to this kind of picture itself, often efficiency is lower and accuracy is not high for this information extraction mode.Cause How this, carry out image flame detection to the bank card picture of this kind of shooting irregularity, so that the subsequent picture based on after correction carries out Content information extracts, improves information extraction efficiency, just becomes a urgent problem to be solved.
Above content is only used to facilitate the understanding of the technical scheme, and is not represented and is recognized that above content is existing skill Art.
Summary of the invention
The main purpose of the present invention is to provide a kind of bank card picture antidote, device, equipment and storage medium, Aim to solve the problem that the technical issues of prior art effectively can not carry out image flame detection to the bank card picture that needs are corrected.
To achieve the above object, the present invention provides a kind of bank card picture antidote, the method includes following steps It is rapid:
The bank card graphic template for obtaining bank card picture and locally prestoring;
Feature Points Matching is carried out to the bank card picture according to the bank card graphic template, and is obtained according to matching result Take the transformation matrix between the bank card graphic template and the bank card picture;
Affine transformation is carried out to the bank card picture according to the transformation matrix, the target bank card figure after obtaining correction Piece.
Preferably, the step for carrying out Feature Points Matching to the bank card picture according to the bank card graphic template Suddenly, comprising:
Feature point extraction is carried out to the bank card graphic template, to obtain the corresponding benchmark of the bank card graphic template Feature point set;
Feature point extraction is carried out to the bank card picture, to obtain the corresponding characteristic point to be matched of the bank card picture Collection;
Feature Points Matching is carried out to the feature point set to be matched using the reference characteristic point set as matching benchmark.
Preferably, the change obtained according to matching result between the bank card graphic template and the bank card picture The step of changing matrix, comprising:
Determine the characteristic point pair of successful match according to the matching result, the characteristic point centering include reference characteristic point and Target corresponding to reference characteristic point characteristic point to be matched;
Obtain the reference characteristic point base position coordinate and the mesh locating in the bank card graphic template Mark the corresponding matching position coordinate of characteristic point to be matched;
The bank card graphic template and the silver are obtained according to the base position coordinate and the matching position coordinate Transformation matrix between row card picture.
Preferably, the reference characteristic point base position locating in the bank card graphic template that obtains is sat The step of mark and target characteristic point to be matched corresponding matching position coordinate, comprising:
The frame of reference is established as coordinate origin using the bank card vertex of pre-configured orientation in the bank card graphic template;
Base position coordinate locating for the reference characteristic point is obtained based on the frame of reference;
The bank card picture is aligned on the corresponding bank card vertex of the pre-configured orientation with the coordinate origin, and is obtained The matching position coordinate for taking target characteristic point to be matched described in the bank card picture locating in the frame of reference.
Preferably, described that the bank card picture mould is obtained according to the base position coordinate and the matching position coordinate The step of transformation matrix between plate and the bank card picture, comprising:
According to the base position coordinate and the matching position coordinate, obtains and the matching position coordinate is transformed to institute State corresponding transformation parameter when the coordinate of base position;
The characteristic points of all successful match is traversed to the characteristic point to obtain successful match to corresponding transformation parameter;
The transformation matrix between the bank card graphic template and the bank card picture is constructed according to the transformation parameter.
It preferably, include translation parameters, rotation parameter and/or zooming parameter in the transformation parameter;
It is described that affine transformation is carried out to the bank card picture according to the transformation matrix, the target bank after obtaining correction The step of card picture, comprising:
The characteristic point in the feature point set to be matched is translated according to the translation parameters, the spy after obtaining translation Sign point;And/or
The characteristic point in the feature point set to be matched is rotated according to the rotation parameter, obtains postrotational spy Sign point;And/or
The characteristic point in the feature point set to be matched is zoomed in and out according to the zooming parameter, the spy after obtaining scaling Sign point;
It is generated according to the characteristic point after characteristic point, the postrotational characteristic point and/or the scaling after the translation Target bank card picture after correction.
Preferably, described the step of Feature Points Matching is carried out to the bank card picture according to the bank card graphic template Before, the method also includes:
The bank card picture is converted into gray level image, is extracted in the bank card picture according to the gray level image Bank card profile;
The corresponding template contours of the bank card graphic template locally prestored are read, detect institute according to the template contours State whether bank card profile meets pre-set image correction condition;
If satisfied, then execute it is described according to the bank card graphic template to the bank card picture carry out Feature Points Matching The step of.
In addition, to achieve the above object, the present invention also proposes a kind of bank card picture apparatus for correcting, described device includes:
Picture obtains module, for obtaining bank card picture and the local bank card graphic template that prestores;
Characteristic matching module, for carrying out characteristic point to the bank card picture according to the bank card graphic template Match, and the transformation matrix between the bank card graphic template and the bank card picture is obtained according to matching result;
Picture rectification module is obtained and is rectified for carrying out affine transformation to the bank card picture according to the transformation matrix Target bank card picture after just.
In addition, to achieve the above object, the present invention also proposes a kind of bank card picture correcting device, the equipment includes: The bank card picture correction program that memory, processor and being stored in can be run on the memory and on the processor, The step of bank card picture correction program is arranged for carrying out bank card picture antidote as described above.
In addition, to achieve the above object, the present invention also proposes a kind of storage medium, bank is stored on the storage medium Card picture corrects program, and the bank card picture correction program realizes bank card picture as described above when being executed by processor The step of antidote.
The present invention passes through acquisition bank card picture and the bank card graphic template locally prestored;According to bank card picture mould Plate carries out Feature Points Matching to bank card picture, and is obtained between bank card graphic template and bank card picture according to matching result Transformation matrix;Affine transformation is carried out to bank card picture further according to transformation matrix, the target bank card picture after obtaining correction, Due to the present invention be according to pre-set bank card graphic template to bank card picture carry out Feature Points Matching, then according to Transformation matrix is constructed with result, affine transformation is carried out to bank card picture further according to transformation matrix to obtain the target silver after correction Row card picture is corrected so as to the bank card picture to all kinds of shooting irregularities, ensure that subsequent to bank card information Smooth extraction.
Detailed description of the invention
Fig. 1 is the structural representation of the bank card picture correcting device for the hardware running environment that the embodiment of the present invention is related to Figure;
Fig. 2 is the flow diagram of bank card picture antidote first embodiment of the present invention;
Fig. 3 is the flow diagram of bank card picture antidote second embodiment of the present invention;
Fig. 4 is the flow diagram of bank card picture antidote 3rd embodiment of the present invention;
Fig. 5 is the structural block diagram of bank card picture apparatus for correcting first embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that described herein, specific examples are only used to explain the present invention, is not intended to limit the present invention.
Referring to Fig.1, Fig. 1 is the bank card picture correcting device knot for the hardware running environment that the embodiment of the present invention is related to Structure schematic diagram.
As shown in Figure 1, the bank card picture correcting device may include: processor 1001, such as central processing unit (Central Processing Unit, CPU), communication bus 1002, user interface 1003, network interface 1004, memory 1005.Wherein, communication bus 1002 is for realizing the connection communication between these components.User interface 1003 may include display Shield (Display), input unit such as keyboard (Keyboard), optional user interface 1003 can also include that the wired of standard connects Mouth, wireless interface.Network interface 1004 optionally may include standard wireline interface and wireless interface (such as Wireless Fidelity (WIreless-FIdelity, WI-FI) interface).Memory 1005 can be the random access memory (Random of high speed Access Memory, RAM) memory, be also possible to stable nonvolatile memory (Non-Volatile Memory, ), such as magnetic disk storage NVM.Memory 1005 optionally can also be the storage device independently of aforementioned processor 1001.
It will be understood by those skilled in the art that structure shown in Fig. 1 is not constituted to bank card picture correcting device It limits, may include perhaps combining certain components or different component layouts than illustrating more or fewer components.
As shown in Figure 1, as may include operating system, data storage mould in a kind of memory 1005 of storage medium Block, network communication module, Subscriber Interface Module SIM and bank card picture correct program.
In bank card picture correcting device shown in Fig. 1, network interface 1004 is mainly used for carrying out with network server Data communication;User interface 1003 is mainly used for carrying out data interaction with user;In bank card picture correcting device of the present invention Processor 1001, memory 1005 can be set in bank card picture correcting device, and the bank card picture correcting device is logical It crosses processor 1001 and calls the bank card picture correction program stored in memory 1005, and execute provided in an embodiment of the present invention Bank card picture antidote.
The embodiment of the invention provides a kind of bank card picture antidotes, are bank card figure of the present invention referring to Fig. 2, Fig. 2 The flow diagram of piece antidote first embodiment.
In the present embodiment, the bank card picture antidote the following steps are included:
Step S10: the bank card graphic template for obtaining bank card picture and locally prestoring;
It should be noted that the executing subject of the method for the present invention can be with Image Acquisition, data operation and program The computer terminal (hereinafter referred to as terminal) of operation function.The bank card graphic template can be developer and match in advance That sets is used to carry out the reference template of image flame detection (including Slant Rectify, correction of standing upside down), includes that position is fixed in the template Unionpay logo (trade mark), and location information of the Unionpay logo in bank card logo template can be used as the other banks of detection Whether card picture needs to carry out the criterion of picture correction.
In the concrete realization, terminal can obtain the bank card picture of user's shooting, then read local pre-stored institute State bank card graphic template.Certainly, bank card graphic template described in the present embodiment can be divided into multiple (such as Unionpay's strap forms With non-Unionpay's strap form etc.), terminal can first detect whether bank card picture carries before obtaining corresponding bank card graphic template There is Unionpay logo, Unionpay's strap form is obtained if having, if without obtaining non-Unionpay's strap form.
Step S20: according to the bank card graphic template to the bank card picture carry out Feature Points Matching, and according to The transformation matrix between the bank card graphic template and the bank card picture is obtained with result;
It should be understood that so-called characteristic point, i.e. image characteristic point, it is able to reflect image substantive characteristics, can be identified for that figure The target object as in.In this step, terminal can carry out feature point extraction to the bank card graphic template, to obtain the bank The corresponding reference characteristic point set of card graphic template;Then feature point extraction is carried out to the bank card picture, to obtain the silver The corresponding feature point set to be matched of row card picture;Using the reference characteristic point set as matching benchmark to the characteristic point to be matched Collection carries out Feature Points Matching.Matrix element in the transformation matrix can be transformation parameter, these transformation parameters are used to characterize Each characteristic point corresponding translation when being transformed to bank card graphic template from bank card picture, the distance of rotation or scaling, angle or Ratio.
Certainly, it since bank card graphic template is relatively fixed under normal conditions, will not arbitrarily change, to improve bank card figure The correction efficiency of piece avoids all repeating to extract above-mentioned " reference characteristic point when carrying out identification correction to each bank card picture Collection ", increase the workload of terminal, can will acquire in the present embodiment described in " reference characteristic point set " carry out packing storage, with Continue after an action of the bowels and calls directly.
Further, it is contemplated that in some special cases, the bank card picture of user's shooting may be sufficiently complete, and or Be in the bank card picture that takes only partial region be include the effective coverage of bank card information, and these effective coverages Provided information is not sufficient to support extraction of the terminal to bank card information after image flame detection.Therefore the present embodiment bank card figure Before executing the step S20, whether the bank card picture that will also detect user's shooting meets image is rectified piece antidote Positive condition.Specifically, the bank card picture is converted to gray level image by the terminal, according to gray level image extraction Bank card profile in bank card picture;The corresponding template contours of the bank card graphic template locally prestored are read, according to The template contours detect whether the bank card profile meets pre-set image correction condition;If satisfied, then executing the step S20。
It should be understood that described be converted to gray level image for bank card picture, i.e., bank card picture is carried out at gray processing Reason obtains gray level image, then passes through threshold function table again for greyscale image transitions at bianry image, then again from the binary map Corresponding bank card profile is extracted as in.In addition, the pre-set image correction condition can be under same scaling The Duplication of bank card profile and template contours is higher than a certain given threshold.The Duplication will two pictures be superimposed When institute attainable Maximum overlap region corresponding accounting.
In the concrete realization, terminal can carry out Feature Points Matching to bank card picture according to bank card graphic template, then The transformation matrix between bank card graphic template and bank card picture is obtained according to matching result.
Step S30: affine transformation is carried out to the bank card picture according to the transformation matrix, the target after obtaining correction Bank card picture.
It should be understood that so-called affine transformation, also known as affine maps, refer to that a vector space carries out primary in geometry Linear transformation simultaneously connects a translation, is transformed to another vector space.Affine transformation is a kind of two-dimensional coordinate to two-dimensional coordinate Between linear transformation, it maintain " grazing " (straight line is still straight line after transformation) of X-Y scheme with it is " parallel Property " (relative positional relationship between X-Y scheme remains unchanged, and parallel lines are still parallel lines, and the position of Points on Straight Line is suitable Sequence is constant).
It will be appreciated that the transformation parameter in the transformation matrix includes but is not limited to translation parameters, rotation in the present embodiment Turn parameter and/or zooming parameter;Correspondingly, the step S30 can include: according to the translation parameters to the feature to be matched The characteristic point that point is concentrated is translated, the characteristic point after obtaining translation;And/or according to the rotation parameter to the spy to be matched The characteristic point that sign point is concentrated is rotated, and postrotational characteristic point is obtained;And/or according to the zooming parameter to described to be matched Characteristic point in feature point set zooms in and out, the characteristic point after obtaining scaling;Then according to the characteristic point, described after the translation Characteristic point after postrotational characteristic point and/or the scaling generates the target bank card picture after correction.In addition, the transformation Parameter is the transformation parameter of all characteristic points of bank card picture.
In the concrete realization, terminal, can be according to the transformation matrix to bank card after getting the transformation matrix Picture carries out affine transformation to obtain the target bank card picture after correction, is based on the target bank card picture again so as to subsequent Extract the information such as bank card number wherein included.
The present embodiment passes through acquisition bank card picture and the bank card graphic template locally prestored;According to bank card picture Template carries out Feature Points Matching to bank card picture, and according to matching result obtain bank card graphic template and bank card picture it Between transformation matrix;Affine transformation is carried out to bank card picture further according to transformation matrix, the target bank card figure after obtaining correction Piece, since the present embodiment is to carry out Feature Points Matching to bank card picture according to pre-set bank card graphic template, then Transformation matrix is constructed according to matching result, after carrying out affine transformation to bank card picture further according to transformation matrix to obtain correction Target bank card picture is corrected so as to the bank card picture to all kinds of shooting irregularities, ensure that subsequent to bank The smooth extraction of card information.
With reference to Fig. 3, Fig. 3 is the flow diagram of bank card picture antidote second embodiment of the present invention.
It is in the present embodiment, described that the bank card picture mould is obtained according to matching result based on above-mentioned first embodiment The step of transformation matrix between plate and the bank card picture, comprising:
Step S201: the characteristic point pair of successful match is determined according to the matching result, the characteristic point centering includes base Quasi- characteristic point and target characteristic point to be matched corresponding to the reference characteristic point;
It should be noted that the characteristic point is to being capable of successful match in i.e. reference characteristic point set and feature point set to be matched Two characteristic points, such as the reference characteristic point be (x, y), the target characteristic point to be matched be the characteristic point to be matched Concentrate with (x, y) corresponding characteristic point (x ', y '), then the characteristic point is to for " [(x, y), (x ', y ')] ".
In the concrete realization, terminal according to the matching result of reference characteristic point set and feature point set to be matched determine matching at The characteristic point pair of function.
Step S202: obtaining reference characteristic point base position coordinate locating in the bank card graphic template, And the corresponding matching position coordinate of the target characteristic point to be matched;
It will be appreciated that picture is to be made of several pixels, and the pixel of different number is according to ad hoc fashion group It is combined and just constitutes the characteristic point of a picture.Terminal will also when extracting the characteristic point of bank card picture in the present embodiment Record each characteristic point information the location of in picture, i.e. characteristic point relative position locating in picture, so-called opposite position Set i.e. origin position it is selected in the case where, position of remaining each characteristic point for the respective place of the origin.
In the concrete realization, terminal can obtain the reference characteristic point in the silver based on the frame of reference constructed in advance The locating corresponding matching position coordinate of base position coordinate and target characteristic point to be matched in row card graphic template.
It should be noted that the present embodiment terminal is when establishing the frame of reference, it can be first with the bank card picture The frame of reference is established as coordinate origin in the bank card vertex of pre-configured orientation in template;The frame of reference is then based on to obtain Take base position coordinate locating for the reference characteristic point;Again by the bank card picture in the corresponding bank of the pre-configured orientation Card vertex is aligned with the coordinate origin, and obtains target characteristic point to be matched described in the bank card picture in the benchmark Locating matching position coordinate in coordinate system.
Wherein, the pre-configured orientation can be any in four orientation such as the lower left corner, the upper left corner, the lower right corner, upper right corner One, such as using the bank card vertex in the lower left corner in bank card graphic template as origin, then by bank in bank card picture The vertex in the card lower left corner is aligned with the origin in template picture, then calculates the positional relationship in two pictures between same characteristic point (such as horizontal distance, vertical range etc.).
Step S203: the bank card graphic template is obtained according to the base position coordinate and the matching position coordinate Transformation matrix between the bank card picture.
In the concrete realization, the base position coordinate and mesh of terminal reference characteristic point in getting each characteristic point pair After the matching position coordinate for marking characteristic point to be matched, base position coordinate and target can be calculated according to their coordinate relationship Then transformation parameter between characteristic point to be matched constructs transformation matrix according to these transformation parameters.
The present embodiment determines the characteristic point pair of successful match according to matching result, and the characteristic point centering includes reference characteristic The point target to be matched characteristic point corresponding with reference characteristic point;Obtain reference characteristic point base locating in bank card graphic template Quasi- position coordinates and the corresponding matching position coordinate of target characteristic point to be matched;According to base position coordinate and matching position Coordinate obtains the transformation matrix between bank card graphic template and bank card picture, to realize accurately obtaining to transformation matrix It takes, ensure that picture correction result accuracy with higher.
With reference to Fig. 4, Fig. 4 is the flow diagram of bank card picture antidote 3rd embodiment of the present invention.
Based on the various embodiments described above, in the present embodiment, the step S203 be may particularly include:
Step S2031: according to the base position coordinate and the matching position coordinate, the matching position is sat in acquisition Mark is transformed to corresponding transformation parameter when the base position coordinate;
It should be understood that terminal the base position coordinate (x, y) for getting a certain characteristic point and with this feature point phase After the matching position coordinate (x ', y ') of matched another feature point, it can calculate and the matching position coordinate is transformed to institute State corresponding transformation parameter when the coordinate of base position.
For example, terminal calculates x=m according to base position coordinate (x, y) and matching position coordinate (x ', y ')11* x '+ m12* y '+m13, y=m21*x+m22*y+m23, then the transformation parameter is [m11, m12, m13, m21, m22, m23], and the transformation is joined In number, " m13”、“m23" it is translation parameters, " m11”、“m12”、“m21" and " m22" it is then rotation parameter or zooming parameter, usual feelings Under condition, rotation parameter is indicated using trigonometric function (cos or sin).
Step S2032: the characteristic points of all successful match is traversed to the characteristic point to obtain successful match to corresponding change Change parameter;
It should be understood that bank card pattern it is generally relatively fixed, generally comprised by taking Interlink Card as an example, on card credit card issuer, The content informations such as bank's card number, validity date, Unionpay logo, currency type, and the different corresponding characteristic points of content information all it is each not It is identical, but the common content information that Interlink Card possesses is exactly above-mentioned Unionpay logo, and the position of Unionpay logo is in Interlink Card It is changeless, therefore terminal, can be unlike its in acquisition picture after obtaining the bank card picture wait correct in the present embodiment The characteristic point of its content need to only obtain the characteristic point of the Unionpay logo, and correspondingly, the bank card graphic template is corresponding Reference characteristic point concentrates the characteristic point that also need to only store Unionpay logo, thus work when greatly simplifying Feature point recognition and extracting Amount greatly improves picture and corrects efficiency.
In the concrete realization, terminal can characteristic point to all successful match to traversing, to obtain these characteristic points To corresponding transformation parameter.
Step S2033: it is constructed between the bank card graphic template and the bank card picture according to the transformation parameter Transformation matrix.
It should be understood that the last line in the transformation matrix is fixed as 0,0,1, it is generally the case that characteristic point and spy Transformation between sign point is realized by 3 × 3 matrixes, such as (x ', y ') is transformed to the specific calculating process of (x, y) are as follows:
In above formula, by m11、m12、m13Matrix, that is, transformation matrix of equal elements building, due to last in above-mentioned matrix The transformation matrix that row is fixed as 0,0,1, therefore 3 × 3 can be reduced to 2 × 3 matrix.In addition, it should be noted that, the present embodiment And the transformation matrix in the various embodiments described above for carrying out affine transformation to bank card picture is by each characteristic point to corresponding son Father's transformation matrix that transformation matrix is constituted.
The present embodiment is obtained according to base position coordinate and matching position coordinate by position on the basis of matching position coordinate transform Set corresponding transformation parameter when coordinate;The characteristic points of all successful match is traversed to the characteristic point to obtain successful match to correspondence Transformation parameter;The transformation matrix between bank card graphic template and bank card picture, the present embodiment are constructed according to transformation parameter Corresponding transformation parameter and being constructed according to transformation parameter becomes when by obtaining matching position coordinate transform being benchmark position coordinates Matrix is changed, ensure that acquisition all obtains transformation matrix accuracy with higher and confidence level.
In addition, the embodiment of the present invention also proposes a kind of storage medium, it is stored with bank card picture on the storage medium and rectifys Positive program, the bank card picture correction program realize bank card picture antidote as described above when being executed by processor The step of.
It is the structural block diagram of bank card picture apparatus for correcting first embodiment of the present invention referring to Fig. 5, Fig. 5.
As shown in figure 5, the bank card picture apparatus for correcting that the embodiment of the present invention proposes includes:
Picture obtains module 501, for obtaining bank card picture and the local bank card graphic template that prestores;
Characteristic matching module 502, for carrying out characteristic point to the bank card picture according to the bank card graphic template Matching, and the transformation matrix between the bank card graphic template and the bank card picture is obtained according to matching result;
Picture rectification module 503 is obtained for carrying out affine transformation to the bank card picture according to the transformation matrix Target bank card picture after correction.
The present embodiment passes through acquisition bank card picture and the bank card graphic template locally prestored;According to bank card picture Template carries out Feature Points Matching to bank card picture, and according to matching result obtain bank card graphic template and bank card picture it Between transformation matrix;Affine transformation is carried out to bank card picture further according to transformation matrix, the target bank card figure after obtaining correction Piece, since the present embodiment is to carry out Feature Points Matching to bank card picture according to pre-set bank card graphic template, then Transformation matrix is constructed according to matching result, after carrying out affine transformation to bank card picture further according to transformation matrix to obtain correction Target bank card picture is corrected so as to the bank card picture to all kinds of shooting irregularities, ensure that subsequent to bank The smooth extraction of card information.
Based on the above-mentioned bank card picture apparatus for correcting first embodiment of the present invention, bank card picture correction dress of the present invention is proposed The second embodiment set.
In the present embodiment, the characteristic matching module 502 is also used to carry out characteristic point to the bank card graphic template It extracts, to obtain the corresponding reference characteristic point set of the bank card graphic template;Characteristic point is carried out to the bank card picture to mention It takes, to obtain the corresponding feature point set to be matched of the bank card picture;Using the reference characteristic point set as matching benchmark pair The feature point set to be matched carries out Feature Points Matching.
Further, the characteristic matching module 502 is also used to determine the feature of successful match according to the matching result Point pair, the characteristic point centering include reference characteristic point and target characteristic point to be matched corresponding to the reference characteristic point;It obtains Reference characteristic point base position coordinate locating in the bank card graphic template and target feature to be matched The corresponding matching position coordinate of point;The bank card picture is obtained according to the base position coordinate and the matching position coordinate Transformation matrix between template and the bank card picture.
Further, the characteristic matching module 502 is also used to the silver of pre-configured orientation in the bank card graphic template The frame of reference is established as coordinate origin in row card vertex;It is obtained locating for the reference characteristic point based on the frame of reference Base position coordinate;By the bank card picture on the corresponding bank card vertex of the pre-configured orientation and the coordinate origin pair Together, and the matching position locating in the frame of reference of target characteristic point to be matched described in the bank card picture is obtained Coordinate.
Further, the characteristic matching module 502 is also used to according to the base position coordinate and the matching position Coordinate obtains corresponding transformation parameter when the matching position coordinate is transformed to the base position coordinate;Traverse all With successful characteristic point to the characteristic point to obtain successful match to corresponding transformation parameter;Institute is constructed according to the transformation parameter State the transformation matrix between bank card graphic template and the bank card picture.
Further, the picture rectification module 503 is also used to according to the translation parameters to the characteristic point to be matched The characteristic point of concentration is translated, the characteristic point after obtaining translation;And/or according to the rotation parameter to the feature to be matched The characteristic point that point is concentrated is rotated, and postrotational characteristic point is obtained;And/or according to the zooming parameter to the spy to be matched The characteristic point that sign point is concentrated zooms in and out, the characteristic point after obtaining scaling;According to after the translation characteristic point, after the rotation Characteristic point and/or the scaling after characteristic point generate correction after target bank card picture.
Further, bank card picture apparatus for correcting described in the present embodiment further includes condition detection module, the condition inspection Module is surveyed, for the bank card picture to be converted to gray level image, the bank card picture is extracted according to the gray level image In bank card profile;The corresponding template contours of the bank card graphic template locally prestored are read, according to the template wheel Exterior feature detects whether the bank card profile meets pre-set image correction condition;If satisfied, then according to the bank card graphic template Feature Points Matching is carried out to the bank card picture.
It is real that the other embodiments or specific implementation of bank card picture apparatus for correcting of the present invention can refer to above-mentioned each method Example is applied, details are not described herein again.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as read-only memory/random access memory, magnetic disk, CD), including some instructions are used so that a terminal device (can To be mobile phone, computer, server, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of bank card picture antidote, which is characterized in that the described method includes:
The bank card graphic template for obtaining bank card picture and locally prestoring;
Feature Points Matching is carried out to the bank card picture according to the bank card graphic template, and institute is obtained according to matching result State the transformation matrix between bank card graphic template and the bank card picture;
Affine transformation is carried out to the bank card picture according to the transformation matrix, the target bank card picture after obtaining correction.
2. method as described in claim 1, which is characterized in that it is described according to the bank card graphic template to the bank card figure Piece carries out the step of Feature Points Matching, comprising:
Feature point extraction is carried out to the bank card graphic template, to obtain the corresponding reference characteristic of the bank card graphic template Point set;
Feature point extraction is carried out to the bank card picture, to obtain the corresponding feature point set to be matched of the bank card picture;
Feature Points Matching is carried out to the feature point set to be matched using the reference characteristic point set as matching benchmark.
3. method as claimed in claim 2, which is characterized in that it is described according to matching result obtain the bank card graphic template and The step of transformation matrix between the bank card picture, comprising:
Determine the characteristic point pair of successful match according to the matching result, the characteristic point centering includes reference characteristic point and described Target corresponding to reference characteristic point characteristic point to be matched;
The reference characteristic point base position coordinate and the target locating in the bank card graphic template is obtained to wait for The corresponding matching position coordinate of matching characteristic point;
The bank card graphic template and the bank card are obtained according to the base position coordinate and the matching position coordinate Transformation matrix between picture.
4. method as claimed in claim 3, which is characterized in that described to obtain the reference characteristic point in the bank card picture mould In plate the step of locating base position coordinate and target characteristic point to be matched corresponding matching position coordinate, comprising:
The frame of reference is established as coordinate origin using the bank card vertex of pre-configured orientation in the bank card graphic template;
Base position coordinate locating for the reference characteristic point is obtained based on the frame of reference;
The bank card picture is aligned on the corresponding bank card vertex of the pre-configured orientation with the coordinate origin, and obtains institute State the characteristic point to be matched of target described in bank card picture matching position coordinate locating in the frame of reference.
5. method as claimed in claim 3, which is characterized in that described to be sat according to the base position coordinate and the matching position Mark obtains the step of transformation matrix between the bank card graphic template and the bank card picture, comprising:
According to the base position coordinate and the matching position coordinate, obtains and the matching position coordinate is transformed to the base Corresponding transformation parameter when quasi- position coordinates;
The characteristic points of all successful match is traversed to the characteristic point to obtain successful match to corresponding transformation parameter;
The transformation matrix between the bank card graphic template and the bank card picture is constructed according to the transformation parameter.
6. method as claimed in claim 5, which is characterized in that in the transformation parameter comprising translation parameters, rotation parameter and/or Zooming parameter;
It is described that affine transformation is carried out to the bank card picture according to the transformation matrix, the target bank card figure after obtaining correction The step of piece, comprising:
The characteristic point in the feature point set to be matched is translated according to the translation parameters, the feature after obtaining translation Point;And/or
The characteristic point in the feature point set to be matched is rotated according to the rotation parameter, obtains postrotational feature Point;And/or
The characteristic point in the feature point set to be matched is zoomed in and out according to the zooming parameter, the feature after obtaining scaling Point;
Correction is generated according to the characteristic point after characteristic point, the postrotational characteristic point and/or the scaling after the translation Target bank card picture afterwards.
7. such as any one of claim 1 to 6 the method, which is characterized in that it is described according to the bank card graphic template to institute Before stating the step of bank card picture carries out Feature Points Matching, the method also includes:
The bank card picture is converted into gray level image, the bank in the bank card picture is extracted according to the gray level image Card wheel is wide;
The corresponding template contours of the bank card graphic template locally prestored are read, detect the silver according to the template contours Whether row card wheel exterior feature meets pre-set image correction condition;
If satisfied, then executing the step for carrying out Feature Points Matching to the bank card picture according to the bank card graphic template Suddenly.
8. a kind of bank card picture apparatus for correcting, which is characterized in that described device includes:
Picture obtains module, for obtaining bank card picture and the local bank card graphic template that prestores;
Characteristic matching module, for carrying out Feature Points Matching to the bank card picture according to the bank card graphic template, and The transformation matrix between the bank card graphic template and the bank card picture is obtained according to matching result;
Picture rectification module, for carrying out affine transformation to the bank card picture according to the transformation matrix, after obtaining correction Target bank card picture.
9. a kind of bank card picture correcting device, which is characterized in that the equipment includes: memory, processor and is stored in institute The bank card picture correction program that can be run on memory and on the processor is stated, the bank card picture correction program is matched It is set to the step of realizing the bank card picture antidote as described in any one of claims 1 to 7.
10. a kind of storage medium, which is characterized in that be stored with bank card picture correction program, the silver on the storage medium Row card picture correction program realizes bank card picture as described in any one of claim 1 to 7 correction side when being executed by processor The step of method.
CN201910206042.3A 2019-03-16 2019-03-16 Bank card picture antidote, device, equipment and storage medium Pending CN110070491A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910206042.3A CN110070491A (en) 2019-03-16 2019-03-16 Bank card picture antidote, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910206042.3A CN110070491A (en) 2019-03-16 2019-03-16 Bank card picture antidote, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110070491A true CN110070491A (en) 2019-07-30

Family

ID=67366340

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910206042.3A Pending CN110070491A (en) 2019-03-16 2019-03-16 Bank card picture antidote, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110070491A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111507354A (en) * 2020-04-17 2020-08-07 北京百度网讯科技有限公司 Information extraction method, device, equipment and storage medium
CN112699740A (en) * 2020-12-10 2021-04-23 广州广电运通金融电子股份有限公司 Bank card information structured extraction method, system and equipment
CN112907453A (en) * 2021-03-16 2021-06-04 中科海拓(无锡)科技有限公司 Image correction method for inner structure of notebook computer
CN113837949A (en) * 2021-08-19 2021-12-24 广州医软智能科技有限公司 Image processing method and device
US11354883B2 (en) 2019-12-30 2022-06-07 Sensetime International Pte. Ltd. Image processing method and apparatus, and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104361314A (en) * 2014-10-21 2015-02-18 华北电力大学(保定) Method and device for positioning power transformation equipment on basis of infrared and visible image fusion
JP2016015037A (en) * 2014-07-02 2016-01-28 キヤノン株式会社 Information processing apparatus and control method, and video camera
CN105976389A (en) * 2016-05-20 2016-09-28 南京理工大学 Mobile phone baseboard connector defect detection method
CN106023182A (en) * 2016-05-13 2016-10-12 广州视源电子科技股份有限公司 PCB image matching method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016015037A (en) * 2014-07-02 2016-01-28 キヤノン株式会社 Information processing apparatus and control method, and video camera
CN104361314A (en) * 2014-10-21 2015-02-18 华北电力大学(保定) Method and device for positioning power transformation equipment on basis of infrared and visible image fusion
CN106023182A (en) * 2016-05-13 2016-10-12 广州视源电子科技股份有限公司 PCB image matching method and system
CN105976389A (en) * 2016-05-20 2016-09-28 南京理工大学 Mobile phone baseboard connector defect detection method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11354883B2 (en) 2019-12-30 2022-06-07 Sensetime International Pte. Ltd. Image processing method and apparatus, and electronic device
CN111507354A (en) * 2020-04-17 2020-08-07 北京百度网讯科技有限公司 Information extraction method, device, equipment and storage medium
CN111507354B (en) * 2020-04-17 2023-12-12 北京百度网讯科技有限公司 Information extraction method, device, equipment and storage medium
CN112699740A (en) * 2020-12-10 2021-04-23 广州广电运通金融电子股份有限公司 Bank card information structured extraction method, system and equipment
CN112907453A (en) * 2021-03-16 2021-06-04 中科海拓(无锡)科技有限公司 Image correction method for inner structure of notebook computer
CN113837949A (en) * 2021-08-19 2021-12-24 广州医软智能科技有限公司 Image processing method and device
CN113837949B (en) * 2021-08-19 2024-01-19 广州医软智能科技有限公司 Image processing method and device

Similar Documents

Publication Publication Date Title
CN110070491A (en) Bank card picture antidote, device, equipment and storage medium
CN109977935B (en) Text recognition method and device
US10885644B2 (en) Detecting specified image identifiers on objects
US20240046598A1 (en) Determining a position of an object in a rotation corrected image
CN107633526A (en) A kind of image trace point acquisition methods and equipment, storage medium
US11710210B1 (en) Machine-learning for enhanced machine reading of non-ideal capture conditions
CN106326802B (en) Quick Response Code bearing calibration, device and terminal device
CN113673519B (en) Character recognition method based on character detection model and related equipment thereof
EP3017399B1 (en) Payment card ocr with relaxed alignment
CN106599758A (en) Image quality processing method and terminal
US11200414B2 (en) Process for capturing content from a document
CN111553251A (en) Certificate four-corner incomplete detection method, device, equipment and storage medium
WO2021189850A1 (en) Certificate authentication method, apparatus and device, and readable storage medium
CN111507181A (en) Bill image correction method and device and computer equipment
CN110827301A (en) Method and apparatus for processing image
CN108256611B (en) Two-dimensional code image generation method and device, computing equipment and storage medium
CN114170419A (en) Equipment region image extraction method and device under natural scene
CN111428707B (en) Method and device for identifying pattern identification code, storage medium and electronic equipment
CN110428033B (en) Verification method, identification end and user end
CN113269186A (en) Image processing method and system
WO2012053626A1 (en) Image comparison device, image comparison method, image comparison system, server, terminal, terminal control method, and terminal control program
WO2022024835A1 (en) Image processing system, image processing method, image processing program, image processing server, and learning model
US10652472B2 (en) Enhanced automatic perspective and horizon correction
CN112733837B (en) Method and apparatus for correcting text image, and computer-readable storage medium
CN117523372A (en) Image authentication method and device and electronic equipment

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20190730