CN102364526A - Method, device and system for discriminating bank magnetic card - Google Patents

Method, device and system for discriminating bank magnetic card Download PDF

Info

Publication number
CN102364526A
CN102364526A CN2011103169605A CN201110316960A CN102364526A CN 102364526 A CN102364526 A CN 102364526A CN 2011103169605 A CN2011103169605 A CN 2011103169605A CN 201110316960 A CN201110316960 A CN 201110316960A CN 102364526 A CN102364526 A CN 102364526A
Authority
CN
China
Prior art keywords
information
standard
magnetic card
identification information
card
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
CN2011103169605A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN2011103169605A priority Critical patent/CN102364526A/en
Publication of CN102364526A publication Critical patent/CN102364526A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a method, device and system for discriminating a bank magnetic card. The system comprises bank self-service equipment, a data transmission interface and a bank magnetic card discriminating device, wherein the bank self-service equipment comprises a card reader, a master control unit and a communication interface; the data transmission interface is used for connecting the bank self-service equipment and the bank magnetic card discriminating device for data transmission; the bank magnetic card discriminating device comprises an image acquisition unit, a communication interface and a master control device; the image acquisition unit is used for acquiring image information of a magnetic card inserted by a user and transmitting the image information to the master control device; the communication interface is used for acquiring standard characteristic information from the bank self-service equipment; and the master control device is used for extracting characteristic information from the image information and generating a discrimination result on the magnetic card inserted by the user according to the characteristic information and the standard characteristic information. According to the invention, the problems that the bank self-service equipment in the prior art cannot be used for discriminating the authenticity of the bank magnetic card so that a chance which can be made use by a criminal is created and economic losses are directly caused to customers are solved.

Description

A kind of method, Apparatus and system of screening bank magnetic stripe card
Technical field
The present invention particularly about the safety technique of bank magnetic stripe card, is a kind of method, Apparatus and system of screening bank magnetic stripe card about the safety technique field specifically.
Background technology
Along with the deep development that China's Financial electronization is built, bank self-aid apparatus in the application of financial industry more and more widely, it is in the distance that furthers between client and the bank; Expansion outlet; Improve environment for card use, round-the-clock, omnibearing financial service is provided, reduce operating cost; Irreplaceable effect is being brought into play in aspects such as the service quality of raising financial industry and synthesized competitiveness, becomes indispensable ingredient in people's life.
Meanwhile; The offender has also aimed at the Possum of bank, has occurred stealing user's bank card magnetic track information and password through card-reading apparatus and camera are installed on Possum; Copying to blank magnetic card or market accumulating card etc. to user's bank card information through technological means has on the magnetic card of magnetic track; And utilize these to forge magnetic card and on Possum, withdraw the money and money transfer transactions, thereby steal user's property, caused direct economic loss to the user.
Bank self-aid apparatus of the prior art can't effectively be screened by the magnetic card that the offender forges these; During information on reading the magnetic card magnetic track; Because forging the magnetic track information of magnetic card is the normal information of duplicating the original magnetic card of user fully; Therefore bank self-aid apparatus is regarded as normal magnetic card with it, concludes the business normally, thereby gives offender's opportunity.
Still there is not a kind of simple scheme of differentiating the bank magnetic stripe card true and false fast in the prior art.
Summary of the invention
The embodiment of the invention provides a kind of method, Apparatus and system of screening bank magnetic stripe card, has solved bank self-aid apparatus of the prior art and can't screen the bank magnetic stripe card true and false, and then given offender's opportunity, causes the problem of direct economic loss to the client.
One of the object of the invention is, a kind of method of screening bank magnetic stripe card is provided, and described method comprises: the image information of gathering the magnetic card that the user inserts; Characteristic information extraction from described image information; Obtain the characteristic information of standard from bank self-aid apparatus; With the characteristic information of the characteristic information of said extraction and the standard generation comparison result of comparing; Generate the examination result of the magnetic card of user's insertion according to described comparison result.
One of the object of the invention is, a kind of device of screening bank magnetic stripe card is provided, and described device comprises: image acquisition units is used to gather the image information of the magnetic card that the user inserts, and described image information is transferred to master control set; Communication interface is used for the characteristic information of the standard of obtaining from bank self-aid apparatus; Described master control set is used for from described image information characteristic information extraction, generates the examination result of the magnetic card of user's insertion according to the characteristic information of described characteristic information and standard.
One of the object of the invention is, a kind of system of screening bank magnetic stripe card is provided, and described system comprises: bank self-aid apparatus comprises: card reader, main control unit and communication interface; Data transmission interface, the device that is used to connect described bank self-aid apparatus and screen bank magnetic stripe card is to carry out data transmission; Screen the device of bank magnetic stripe card, comprising: image acquisition units is used to gather the image information of the magnetic card that the user inserts, and described image information is transferred to master control set; Communication interface is used for the characteristic information of the standard of obtaining from bank self-aid apparatus; Described master control set is used for from described image information characteristic information extraction, generates the examination result of the magnetic card of user's insertion according to the characteristic information of described characteristic information and standard.
The invention has the beneficial effects as follows: a kind of method, Apparatus and system of screening bank magnetic stripe card is provided; Through the device of screening bank magnetic stripe card is installed on bank self-aid apparatus; Can discern the magnetic card of forgery effectively; Stop offender's further criminal activity, greatly improved user's property safety.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art; To do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below; Obviously, the accompanying drawing in describing below only is some embodiments of the present invention, to those skilled in the art; Under the prerequisite of not paying creative work property, can also obtain other accompanying drawing according to these accompanying drawings.
A kind of method flow diagram of screening bank magnetic stripe card that Fig. 1 provides for the embodiment of the invention;
The process flow diagram of Fig. 2 for from image information, extracting flag information and compare with the identification information of standard;
Fig. 3 is the synoptic diagram that from image information, extracts identification information;
The process flow diagram of Fig. 4 for from image information, extracting numerical information and compare with the numerical information of standard;
Fig. 5 is the synoptic diagram that from image information, extracts numerical information;
A kind of structured flowchart of screening the system of bank magnetic stripe card that Fig. 6 provides for the embodiment of the invention;
Fig. 7 is the structured flowchart of the master control set in the embodiment of the invention;
Fig. 8 is the structured flowchart of sign information identificating unit in the embodiment of the invention;
Fig. 9 is the structured flowchart of the identification information comparing unit in the embodiment of the invention;
Figure 10 is the structured flowchart of the another kind of embodiment of the master control set in the embodiment of the invention;
Figure 11 is the structured flowchart of the numerical information recognition unit in the embodiment of the invention;
Figure 12 is the structured flowchart of the numerical information comparing unit in the embodiment of the invention;
Figure 13 is the structured flowchart of the embodiment three of the master control set in the embodiment of the invention;
Figure 14 is the structured flowchart of the device of the examination bank magnetic stripe card in the embodiment of the invention;
Figure 15 is the structure diagram of the master control set in the embodiment of the invention;
Figure 16 is the block diagram of the standard density value of display digit 0,3,4;
Figure 17 is the block diagram of the density value of demonstration numeral 3,4,5 to be identified.
Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
Fig. 1 is a kind of method flow diagram of screening bank magnetic stripe card that the embodiment of the invention provides, and can be known that by Fig. 1 this method comprises:
S101: the image information of gathering the magnetic card of user's insertion.The magnetic card here possibly be the magnetic card just of issued by banks, also possibly be that the lawless person steals the illegal card that duplicates after user's the card information.Image information is the card face full figure of the magnetic card of user's insertion.
S102: characteristic information extraction from described image information, the characteristic information of mentioning among the present invention comprises numerical information and/or identification information, wherein, numerical information comprises the card number that prints on the magnetic card, is the digital printed font of standard; Identification information mainly comprises the characteristic informations such as Unionpay, MASTER and VISA on the bank magnetic stripe card.
S103: obtain the characteristic information of standard from bank self-aid apparatus, comprised the identification information of the numerical information and the standard of standard in the characteristic information of standard.
S104: with the characteristic information of the characteristic information of said extraction and the standard generation comparison result of comparing;
S105: the examination result who generates the magnetic card of user's insertion according to described comparison result.
The process flow diagram of Fig. 2 for from image information, extracting flag information and compare with the identification information of standard can be known by Fig. 2, from image information, extracts identification information and comprises:
S201: described image information is carried out gradation conversion handle.The principle of gradation conversion is following:
Be divided into some grades by logarithmic relationship between white and the black, be called gray scale, gray scale is divided into 256 rank.The image of representing with gray scale is called gray-scale map.
From the image information of magnetic card collection is coloured image, form by Red Green Blue, if in the magnetic card image certain the some color be RGB (R, G B), through following formula (1), are converted into gray scale:
Gray=R*0.3+G*0.59+B*0.11 (1)
S202: described image information is carried out binary conversion treatment.The process of binary conversion treatment is following: handle through gradation conversion in the gray level image of back formation, if each gray values of pixel points is greater than pre-set threshold value (initial value is 128), and then the gray-scale value of this point is 255 (black); If each gray values of pixel points is less than in pre-set threshold value, then the gray-scale value of this point is 0 (white).
S203: described image information is carried out the noise reduction smoothing processing.Because there are situation such as wearing and tearing, spot in magnetic card in use surface, can make in the image information of collection and produce some noise, therefore need carry out noise reduction, smoothly to image.Specifically carry out through following mode: in image, choose 8 points around each pixel, if the picture element of same color (black, white) is no more than pre-set threshold (initial value 4) in 8 points, then this color resets to opposite color.
S204: extract identification information the image information after handling.This step comprises:
S1: the image information to after handling is carried out detection and location, and the concrete course of work is following:
Identification information such as Unionpay, VISA generally is printed in the magnetic card right areas, and all in 20mm * 15mm scope, the longitudinal pitch of different identification pattern surpasses 1mm to the length and width (height) of identification patterns such as all Unionpay, VISA.
For accelerating juggling speed, at first detection and location are carried out in the target area at identification information places such as printing Unionpay in the image information of magnetic card to identification information.
The concrete grammar of detection and location is:
The magnetic card image is divided into the left, center, right three equal parts by wide (height) degree direction, and the length and width (height) of setting right zone are of a size of 28.50mm * 53.98mm, and the coordinate of four angle points be under the left side (0; 0), upper left (0; Y), bottom right (x, 0), upper right (x, y); (wherein x is the pixel coordinates value of the 1/3 standard length 28.50mm conversion of magnetic card image, and y is the pixel coordinates value of the normal width 53.98mm conversion of magnetic card image).
The length and width of reference identification information (height) dimensional standard is about 20mm * 15mm, and the length and width (height) of establishing identification information zone to be detected are of a size of 20mm * 53.98mm.
Being pressed into the card direction by from left to right, is (0,0) beginning from coordinate; The coordinate of four angle points of statistics be (0,0), (0, y), (c; 0), (c; Y) color is made as B0 for black picture element quantity in (wherein c is the pixel coordinates value of the maximum length 20mm conversion of identification characteristics pattern) zone, compares with preset threshold values B.
The picture element coordinate that moves to right is (1,0) point from coordinate, the coordinate that continues four angle points of statistics be (1,0), (1, y), (c+1,1), (c+1, y) the picture element quantity of color for deceiving in the zone is made as B1.
So analogize, go through all over the whole right zone of statistics, last statistical regions be that (x-c, 0) upper left (x-c, y) bottom right (x, 0) upper right (x, y), last value is Bn down on a left side.
Should be at most for black picture element quantity based on color in the zone that is printed with identification informations such as complete Unionpay, compare B0, B1; ...; Bn gets wherein maximal value, and compares (to be to suppose to be the basic blank magnetic card in a surface with the purpose of threshold values comparison with preset threshold values B; Be peaked zone through picture element quantity still occurring after the above-mentioned statistics; But obviously such statistics is invalid), greater than threshold values B then the zone at maximal value place be the target area that is printed with signs such as Unionpay, then do not have the target area less than threshold values A.
S2: behind the target area of positioning mark information, detection and location are carried out in identification information zone wherein.
The concrete side's flow process that detects is:
The coordinate of supposing four angle points in sign target area is a left side following (0; 0), upper left (0, y), bottom right (c, 0), upper right (c; Y) (wherein y is the pixel coordinates value of the normal width 53.98mm conversion of magnetic card image, and c is the pixel coordinates value of the maximum length 20mm conversion of identification pattern).
The length and width of reference identification information (height) dimensional standard is about 20mm * 15mm, and the length and width (height) of setting identification information target area to be detected are of a size of 20mm * 15mm, and the length and width (height) of setting identification information pitch area to be detected are of a size of 20mm * 1mm.
Pressing magnetic card from lower to upper, is that (0, d) (d is the pixel coordinates value of the minimum spacing 1mm conversion of identification information) begins from coordinate; The coordinate of four angle points of statistics be (0, d), (0, d+b), (c; D), (c; D+b) color is made as B0 for black picture element quantity in (wherein b is the pixel coordinates value of the breadth extreme 15mm conversion of identification pattern) zone, compares with preset threshold values B.
Add up its below next-door neighbour four angle points coordinate for (0,0), (0, d), (c, 0), (c, d) color is made as Cl0 for black picture element quantity in the zone, compares with preset threshold values C.
Add up again its top next-door neighbour four angle points coordinate for (0, d+b), (c, d+b), (0, d+2b), (c, d+2b) color is made as Cr0 for black picture element quantity in the zone, compares with preset threshold values C.
On move a picture element coordinate, count B1, Cl1 and Cr1 as stated above.
So analogize, go through all over statistics whole sign target area, last statistical regions be a left side down (0, y-d-b), upper left (0, y-d), the bottom right (c, y-d-b), upper right (c, y-d), last value is Bn, Cln and Crn.
The differentiation process of sign target-region locating process is following:
Less than threshold values B, show that this zone does not have the characteristic of identification information like Bn, be inactive area, move a picture element coordinate on then and proceed to differentiate;
Greater than threshold values B, but Cln or Crn show that greater than C this zone has the characteristic of identification information like Bn, but there is not the characteristic of identification information spacing in its zone that is close to up and down, still is inactive area, move a picture element coordinate on then to proceed to differentiate;
Like Bn greater than threshold values B and Cln and Crn all greater than C; Show that this zone has the characteristic of identification information; And there is the characteristic of spacing in its zone that is close to up and down; Then should the zone be effective sign target area, behind four angular coordinates of posting field and sign target effective region-counter K=K+1 (initial value is 0), on move a picture element coordinate and proceed to differentiate.
As traveling through the whole effective coverage of statistics, K<threshold values I (default value I=1, promptly magnetic card should have an identification information at least) shows the effective sign target area that does not exist or do not have sufficient amount.
In testing process,, then stop to detect like K>threshold values H (default value H=3, promptly magnetic card is no more than three identification informations).
S3: after accomplishing a zone to be detected, whether relatively identify effective coverage counter K greater than threshold values H (default value H=3), as detecting greater than then stopping, execution in step S8 is as less than then proceeding following steps.
S4: judge whether current area coordinate to be detected is last statistical regions coordinate, then carries out S8 in this way, as not being then to proceed following steps.
S5: identified areas cutting.
Cutting is carried out in detected sign target area; And the white space around will identifying removes; Cut out the actual effective coverage (size in zone should be consistent with the identification information size of the standard of storing) of sign, form a new image that comprises an identification pattern information.
S6: the identification image after the cutting is by the numbering storage.
Each identification information is expressed as Q1, Q2...Qn, and wherein Q1 representes detected first identification information, Qn representes detected last identification information, n<=3 (identification information on the normal bank magnetic stripe card is no more than 3).
S7: whether relatively identify effective coverage counter K less than threshold values I (default value I=1), as being zero, as detecting execution in step S8 greater than then stopping less than then putting the sign comparison result.
S8: with all identification information output.
Fig. 3 is the synoptic diagram that from image information, extracts identification information, the process example of visible whole extraction from Fig. 3.
When characteristic information was identification information, the identification information of the identification information of said extraction and standard compared to be generated comparison result and comprises:
S205: the coordinate figure of the identification information of definite identification information that extracts and standard in coordinate system;
S206: the pixel difference of confirming the identification information of identification information that same coordinate figure place extracts and standard;
S207: the matching result of confirming same coordinate place according to described pixel difference;
S208: the ratio shared according to the successful pixel of coupling in the matching result generates comparison result.
Comparison process to identification informations such as Unionpay adopts image comparison technology, and detailed process is following:
The identification information of tentative standard is A (total pixel number is E); The identification information to be compared of current extraction is B; The image size dimension of two identification informations is all identical, and identification information to be compared is process gradation conversion, binaryzation, noise reduction is level and smooth and cutting etc. handled the frame of back extraction, the at first coordinate figure of definite two width of cloth images in coordinate system; Then each picture element An of same coordinate in two width of cloth images and the pixel number of Bn are carried out additive operation, draw difference Cn; Work as Cn=0, then expression is mated successfully, generates the successful matching result of coupling, match counter D=D+1 (D initial value=0), otherwise, generate the matching result that matees failure; At last with the value of D/E and threshold values F (the default value F=90% that presets; Also can preestablish according to different application scenes) compare; If D/E, then generates the successful comparison result of current identification information comparison greater than threshold values F, current identification information is effective identification pattern; As less than reservation threshold, then generate the comparison result of current identification information comparison failure, current identification information is invalid identification pattern.
The process flow diagram of Fig. 4 for from image information, extracting numerical information and compare with the numerical information of standard; When characteristic information is numerical information; Characteristic information extraction comprises from described image information: characteristic information extraction from image information, the characteristic information that extracts is discerned.
Characteristic information extraction from image information specifically comprises: S1: carry out the detection and location of numerical information target area.
Relevant regulations according to People's Bank of China; Magnetic card and magnetic card be manufactured with unified standard; The length and width of common magnetic card (height) dimensional standard is 85.60mm * 53.98mm (allowing certain error), and signature identifications such as card number information consistent with magnetic track information and Unionpay must be printed in the magnetic card surface.
Wherein card number information generally is printed on the central region of magnetic card, and each digital length and width (height) dimensional standard is about 3mm * 5mm in the card number, the about 1mm of word space, and the reference position of first digit is in magnetic card left end 10mm scope.Card number length is the 16-19 position.
For accelerating processing speed, at first detection and location are carried out to realize Region Segmentation in the numerical information zone of printing card number in the image information of magnetic card to the numerical information of card number.
The detailed process of detection and location is:
Time three equal parts during the image information of magnetic card is divided into by wide (height) degree direction; The length and width (height) of setting zone line are of a size of 85.60mm * 18mm, and the coordinate of four angle points is a left side (0,0), upper left (0 down; Y), bottom right (x; 0), upper right (x, y) (wherein x is the pixel coordinates value of the standard length 85.60mm conversion of magnetic card image, and y is the pixel coordinates value of the 1/3 normal width 18mm conversion of magnetic card image).
Length and width (height) dimensional standard with reference to the card number numeral is about 3mm * 5mm, and the length and width (height) of setting card number target area to be detected are of a size of 85.60mm * 7mm (on former card number digital standard height basis, respectively increasing 1mm up and down).From coordinate is (0,0) beginning, and the coordinate of four angle points of statistics is (0; 0), (0; B), (x, 0), (x, b) in the zone color (wherein b is the pixel coordinates value of the calibrated altitude 5mm+2mm conversion of card number numeral for black picture element quantity; Promptly on primary standard height basis, respectively increase 1mm up and down), be made as A0.
On move a picture element coordinate, be (0,1) point from coordinate, the coordinate that continues four angle points of statistics be that (0,1) (0, b+1) (x, 1) (x, b+1) the picture element quantity of color for deceiving in the onesize zone is made as A1.
So analogize, go through all over the whole zone line of statistics, the coordinate of four angle points of last statistical regions be a left side down (0, y-b), upper left (0, y), the bottom right (x, y-b), upper right (x, y), last value is An.
Should be at most for black picture element quantity based on color in the zone that is printed with complete card number, compare A0, A1; ..., An gets wherein maximal value; And compare with preset threshold values A and (to be to suppose the basic blank magnetic card in a surface with the purpose of threshold values comparison; Be peaked zone through picture element quantity still occurring after the above-mentioned statistics, but obviously such statistics is invalid), then be the target area of printing card number in the zone at maximal value place greater than threshold values A.Then there is not the target area less than threshold values A.
Through the screening maximal value and with threshold values relatively to the detecting and locating of target area of printing card number.Detect effective and unique target area and then continue following steps, detect less than the then direct execution in step S9 in effective target area.
S2: behind card number target area, location, detection and location are carried out in digital object zone wherein.
The concrete grammar that detects is:
Length and width (height) in the card number target area, back, location are of a size of 85.60mm * 7mm; The coordinate of four angle points is a left side following (0; 0), upper left (0, b), bottom right (x, 0), upper right (x; B) (wherein x is the pixel coordinates value of the normal width 85.60mm conversion of magnetic card image, and b is the pixel coordinates value of the calibrated altitude 5mm+2mm conversion of card number numeral).
Length and width (height) dimensional standard with reference to the card number numeral is about 3mm * 5mm; The length and width (height) of setting digital object zone to be detected are of a size of 4mm * 7mm (about on the former card number digital standard length basis, respectively increasing 0.5mm), and the length and width (height) of setting digital pitch area to be detected are of a size of 0.5mm * 7mm.
Being pressed into the card direction by from left to right, is (d, 0) (d is the pixel coordinates value of the 1/2 standard word spacing 0.5mm conversion of card number numeral) beginning from coordinate; The coordinate of four angle points of statistics be (d, 0), (d, b), (d+c; 0), (d+c, b) color is black picture element quantity in (c is the pixel coordinates value of the standard length 3mm+1mm conversion of card number numeral, promptly on primary standard length basis about respectively increase 0.5mm) zone; Be made as B0, compare with preset threshold values B.
Add up its left side next-door neighbour four angle points coordinate for (0,0), (0, b), (d, 0), (d, b) color is made as Cl0 for black picture element quantity in the zone, compares with preset threshold values C.
Add up again its right side next-door neighbour four angle points coordinate for (d+c, 0), (d+c, b), (d+c+d, 0), (d+c+d, b) color is made as Cr0 for black picture element quantity in the zone, compares with preset threshold values C.
The picture element coordinate that moves to right counts B1, Cl1 and Cr1 as stated above.
So analogize, go through all over statistics whole card number effective coverage, last statistical regions be a left side down (x-c-d, 0), upper left (x-c-d, b), bottom right (x-c, 0), it is upper right that (x-c, b), last value is Bn, Cln and Crn.
Less than threshold values B, show that this zone does not have the characteristic of digital picture like Bn, be inactive area, the picture element coordinate that then moves to right is proceeded to differentiate.
Greater than threshold values B, but Cln or Crn show that greater than C this zone has the characteristic of digital picture like Bn, but there is not the characteristic of character pitch in its left and right sides next-door neighbour's zone, still be inactive area, and the picture element coordinate that then moves to right is proceeded differentiation.
Like Bn greater than threshold values B and Cln and Crn all greater than C; Show that this zone has the characteristic of digital picture; And there is the characteristic of character pitch in its left and right sides next-door neighbour's zone; Should the zone be effective digital object zone then, behind four angular coordinates of posting field and digital object effective coverage counter D=D+1 (initial value is 0), the picture element coordinate that moves to right be proceeded to differentiate.
As traveling through the whole effective coverage of statistics, D<threshold values F (default value F=8, promptly the digital object region quantity of location should be no less than the half the of 16 standard card number length) shows the effective digital object zone that does not exist or do not have sufficient amount.
In testing process, like D>threshold values E (default value E=19, the i.e. maximum length of card number), show that the digital object region quantity of location exceeds the card number maximum length, then stop to detect.
S3: after accomplishing a zone to be detected, whether comparative figures effective coverage counter D greater than threshold values E (default value E=19), and as detecting greater than then stopping, execution in step S7 is as less than then continuing following steps.
S4: judge whether current area coordinate to be detected is last statistical regions coordinate, execution in step S7 then in this way is not as being then to proceed following steps.
S5: to the numeric area cutting.
Cutting is carried out in detected digital object zone, and the white space around the numeral is removed, cut out the actual effective coverage of numeral, form a new image that comprises a digital graphical information.
S6: the digital picture after the cutting is by the numbering storage.
Each digital image representation is P1, P2...Pn, and wherein P1 representes detected first digit image, Pn representes detected last card number digital picture, n<=19.
S7: whether comparative figures target effective region-counter D less than threshold values F (default value F=8), as less than execution in step S9 then, as greater than then stopping detection and location, execution in step S8.
S8: with all digital picture output.
S9: putting the card number comparison result is 0.
Described characteristic information is discerned, technological to the identification employing of numerical information based on the digit recognition of cutting apart with density calculation, specifically comprise:
S301: described numerical information is carried out Region Segmentation, promptly the digital picture of cutting is cut apart, for example be divided into 3*5 zone, each regional area equates, below is that example describes with 15 zones just.
S302: confirm the shared ratio value of black picture element in each zone, S303: the density value of confirming numerical information according to described ratio value.This two step specifically comprises: in each zone, calculate the number of black pixel point, according to shared number percent, assignment 0-10 so forms 15 density attributes values as this regional density respectively, carries out the characteristic of digit recognition as digital picture with this.
Figure 17 is 15 density attributes values of numeral 3,4,5,6, can be known by Figure 17, and 15 density attributes values of numeral 3 to be identified, numeral 4, numeral 5 and numeral 6 are diverse.
The density definition of the numerical information of standard: the density attributes value of these 10 numerals of digital 0-9 respectively being set one group of standard.Figure 16 is the standard density of numeral 0,3,4, and 1,2,5,6,7,8,9 standard density here no longer similarly repeats no more here.
S304: the numerical information of extracting described image information according to described density value.The identifying of numerical information is following to be that example describes with the numeral among Figure 17 3:
In Figure 17,15 density attributes values of numerical information 3 to be identified are made as A-1 respectively, A-2...A-15,
15 standard density property values of the numerical information 3 of the standard among Figure 16 are respectively B3-1; B3-2...B3-15; 15 standard density property values of the numerical information 4 of standard are respectively B4-1, B4-2...B4-15, and other digital standard density property values are by that analogy.
Preestablish difference threshold values D=2.
The difference of 15 standard attribute values that 15 property values that calculate digital picture to be identified and numeral 0 are corresponding, and take absolute value, draw C0-1;, C0-2...C0-15, this array compares with difference threshold values D respectively; Suppose C0-n<=D, show that this zone to be identified and standard attribute value are identical, then goodness of fit counter E0=E0+1 (initial value is 0); By that analogy, draw E0=7 at last;
Similarly, the comparison of 15 standard attribute values that 15 property values that carry out image to be identified and numeral 3 are corresponding draws E3=10 at last.
Similarly, the comparison of 15 standard attribute values that 15 property values that carry out image to be identified and numeral 4 are corresponding draws E4=6 at last.
In like manner, carry out the comparison of 15 property values of image to be compared, 15 the standard attribute values corresponding, draw E1, E2......E9 with other numerals.
Screening maximal value wherein from E0, E1, E2......E9, maximal value is E3=10 among this embodiment.
If have only a maximal value in the results of screening, then its corresponding digital numerical value is recognition result, also is that the present embodiment kind is 3 to the numerical information of discerning, as filters out the maximal value that equates more than two, then shows and can't discern.Fig. 5 intuitively shows the course of work of from image information, extracting numerical information with graphics mode.
When characteristic information was numerical information, the numerical information of the numerical information of said extraction and standard compared to be generated comparison result and comprises:
S305: the numerical information to standard is numbered processing.The card number length of bank is generally 16 to 19, so number consecutively is M1, M2......Mn, and meter card number length is Q.The numerical information of standard is for to read the card number information that transmits behind the current magnetic card by bank self-aid apparatus here.
S306: the numerical information to after the identification is numbered processing.
The numerical information of extracting also is generally 16 to 19, and number consecutively is P1, P2......Pn, if any the numeral that can't discern, then stores with numeral 99 in the numerical information, and for example image P3 can't discern, then P3=99.
S307: the numerical information of same numbering and the numerical information of standard are mated the generation matching result.Promptly mate, for example P1 and M1 are mated, confirm whether P1 equals M1 by the corresponding order of numbering; When P1=M1; Then generate the successful matching result of coupling, numerical information match counter P=P+1 (initial value is 0), otherwise generate the matching result that coupling is failed.
S308: generate comparison result according to comparing successfully shared ratio in the matching result.
Promptly after accomplishing all digital coupling, calculate P/Q, the value with P/Q compares with preset threshold values F at last, if P/Q greater than threshold values F, then generates the successful comparison result of current digit information comparison, current digit information is effective digital pattern; As less than reservation threshold, then generate the comparison result of current digit information comparison failure, current digit information is invalid digital pattern.
At last, generate the examination result of the magnetic card of user's insertion according to described comparison result.This step can realize through following three kinds of embodiments:
1, when characteristic information only comprises numerical information, the comparison result of generation thinks that then current numerical information is digital pattern effectively when comparing successfully, and generating current magnetic card is the examination result of effective magnetic card; The comparison result that generates is during for the comparison failure, thinks that then current numerical information is digital pattern ineffectually, and generating current magnetic card is the examination result of invalid magnetic card.
2, when characteristic information only comprises identification information, the comparison result of generation is when comparing successfully, to think that then current identification information is effective identification pattern, and generating current magnetic card is the examination result of effective magnetic card; When the comparison result that generates is failed for comparison, think that then current identification information is invalid identification pattern, generating current magnetic card is the examination result of invalid magnetic card.
3, when characteristic information comprises numerical information and identification information, this moment, the examination result of magnetic card needed to judge through the coupling of numerical information and these two key elements of identification information simultaneously, therefore needed the preset weighted value of the comparison result of these two key elements.
Wherein the weighted value of numerical information is made as X (initial value is 0.7, can set), and the weighted value of identification information is made as Y and (works as D/E=1; Initial value Y=0.2; When D/E>1, initial value Y=0.3, expression detects the credibility Du Genggao of two signs than a sign simultaneously).
If Z is the magnetic card effective value, then
Z=X * P/Q+Y * D/E works as D/E=1, Z=0.7 * P/Q+0.2 * D/E
Z=X * P/Q+Y * D/E, when D/E>1, Z=0.7 * P/Q+0.3 * D/E
Judge the size of magnetic card effective value Z and the effective threshold values Zs of magnetic card (initial value is 0.7), Z is during greater than threshold values, and then differentiating magnetic card is effective magnetic card, and promptly generating current magnetic card is the examination result of effective magnetic card; Z is during less than threshold values, and differentiating magnetic card is invalid magnetic card, and generating current magnetic card is the examination result of invalid magnetic card.
Fig. 6 is a kind of structured flowchart of screening the system of bank magnetic stripe card that the embodiment of the invention provides, and can be known that by Fig. 6 this system comprises:
Bank self-aid apparatus 100 comprises: card reader 101, main control unit 102 and communication interface 103.Bank self-aid apparatus is meant the self-help terminal equipment that bank sets up in the site, comprises ATM (ATM), automatic cash dispenser, circulation ATM (CRS), self-service query machine, self-help charging machine etc.
Data transmission interface 200, the device that is used to connect described bank self-aid apparatus and screen bank magnetic stripe card is to carry out data transmission.In concrete embodiment, data transmission interface can be realized through the RS232 interface.
Screen the device 300 of bank magnetic stripe card, comprising: image acquisition units 301 is used to gather the image information of the magnetic card that the user inserts, and described image information is transferred to master control set.In concrete embodiment, data acquisition unit can be realized through camera, can comprise that also the LED auxiliary lighting apparatus is to take the direct picture of current magnetic card more clearly.
Communication interface 302; The characteristic information that is used for the standard of obtaining from bank self-aid apparatus; The characteristic information of standard comprises the identification information of the numerical information and/or the standard of standard; The card number information that the card reader of the numerical information of standard through bank self-aid apparatus reads current magnetic card obtains, and the identification information of standard can be realized through the mode of storage in advance, also can be realized through other modes.
Described master control set 303 is used for from described image information characteristic information extraction, generates the examination result of the magnetic card of user's insertion according to the characteristic information of described characteristic information and standard.
The device 300 of screening bank magnetic stripe card will be screened the result and transfer to bank self-aid apparatus through data transmission interface 200 after generating and screening the result, and bank self-aid apparatus carries out corresponding process operations according to screening the result; Promptly when the examination result shows current magnetic card for effective card; Then conclude the business normally, otherwise carry out the magnetic card abnormality processing, for example can move back card and handle; Show the corresponding prompt picture, and send warning message to Surveillance center.
Figure 14 is the structured flowchart of the device of the examination bank magnetic stripe card in the embodiment of the invention, because 14 can know that this device 300 also comprises: inductor 304 is used to respond to the bank magnetic stripe card that the user inserts; Conveyer 305 is used for transmitting the magnetic card that the user inserts to bank self-aid apparatus.
The system of the examination bank magnetic stripe card that the embodiment of the invention provides; The device 300 of screening magnetic card is installed in the card reader front end of bank self-aid apparatus 100; Magnetic card gets into the inlet of the device 300 of screening bank magnetic stripe card; Trigger inductor 304, master control set 303 sends control signal to start conveyer to conveyer 305, and magnetic card is at the uniform velocity sent into the device 300 of screening bank magnetic stripe card.
When magnetic card triggers inductor in transport process after; Master control set sends control signal to conveyer and stops to transmit magnetic card; Master control set sends control signal and starts camera (starting the LED assist illuminator simultaneously), and camera gets access to static magnetic card image and carries out Flame Image Process, identification.
After accomplishing shooting; Master control set sends control signal to conveyer to be continued magnetic card is sent in the card reader of bank self-aid apparatus 100; Inductor is from being blocked state transformation when not being blocked state in the magnetic card transport process, and master control set sends control signal to conveyer and stops transmission work.
After magnetic card got into the card reader of bank self-aid apparatus, card reader was obtained the magnetic card magnetic track information, and the identification information of card number information and preset standard is sent to the device 300 of screening bank magnetic stripe card compared.The device 300 that back examination bank magnetic stripe card is accomplished in comparison will be screened the result and return to bank self-aid apparatus, carry out corresponding process operations by bank self-aid apparatus.
Fig. 7 is the structured flowchart of the master control set in the embodiment of the invention, can be known by Fig. 7, and described master control set comprises:
Identification information recognition unit 3031 is used for extracting identification information from described image information;
Identification information comparing unit 3032 is used for the flag information of flag information that extracts and the standard generation comparison result of comparing.
Fig. 8 is the structured flowchart of sign information identificating unit in the embodiment of the invention, can be known that by Fig. 8 identification information recognition unit 3031 comprises:
Gradation conversion unit 30311 is used for that described image information is carried out gradation conversion and handles.The principle of gradation conversion is following:
Be divided into some grades by logarithmic relationship between white and the black, be called gray scale, gray scale is divided into 256 rank.The image of representing with gray scale is called gray-scale map.
From the image information of magnetic card collection is coloured image, form by Red Green Blue, if in the magnetic card image certain the some color be RGB (R, G B), through following formula (1), are converted into gray scale:
Gray=R*0.3+G*0.59+B*0.11 (1)
Binary conversion treatment unit 30312 is used for described image information is carried out binary conversion treatment.The process of binary conversion treatment is following: handle through gradation conversion in the gray level image of back formation, if each gray values of pixel points is greater than pre-set threshold value (initial value is 128), and then the gray-scale value of this point is 255 (black); If each gray values of pixel points is less than in pre-set threshold value, then the gray-scale value of this point is 0 (white).
Noise reduction smooth unit 30313 is used for described image information is carried out the noise reduction smoothing processing.Because there are situation such as wearing and tearing, spot in magnetic card in use surface, can make in the image information of collection and produce some noise, therefore need carry out noise reduction, smoothly to image.Specifically carry out through following mode: in image, choose 8 points around each pixel, if the picture element of same color (black, white) is no more than pre-set threshold (initial value 4) in 8 points, then this color resets to opposite color.
Identification information extraction unit 30314, the image information that is used for after handle is extracted identification information, and treatment scheme specifically comprises:
S1: the image information to after handling is carried out detection and location, and the concrete course of work is following:
Identification information such as Unionpay, VISA generally is printed in the magnetic card right areas, and all in 20mm * 15mm scope, the longitudinal pitch of different identification pattern surpasses 1mm to the length and width (height) of identification patterns such as all Unionpay, VISA.
For accelerating juggling speed, at first detection and location are carried out in the target area at identification information places such as printing Unionpay in the image information of magnetic card to identification information.
The concrete grammar of detection and location is:
The magnetic card image is divided into the left, center, right three equal parts by wide (height) degree direction, and the length and width (height) of setting right zone are of a size of 28.50mm * 53.98mm, and the coordinate of four angle points be under the left side (0; 0), upper left (0; Y), bottom right (x, 0), upper right (x, y); (wherein x is the pixel coordinates value of the 1/3 standard length 28.50mm conversion of magnetic card image, and y is the pixel coordinates value of the normal width 53.98mm conversion of magnetic card image).
The length and width of reference identification information (height) dimensional standard is about 20mm * 15mm, and the length and width (height) of establishing identification information zone to be detected are of a size of 20mm * 53.98mm.
Being pressed into the card direction by from left to right, is (0,0) beginning from coordinate; The coordinate of four angle points of statistics be (0,0), (0, y), (c; 0), (c; Y) color is made as B0 for black picture element quantity in (wherein c is the pixel coordinates value of the maximum length 20mm conversion of identification characteristics pattern) zone, compares with preset threshold values B.
The picture element coordinate that moves to right is (1,0) point from coordinate, the coordinate that continues four angle points of statistics be (1,0), (1, y), (c+1,1), (c+1, y) the picture element quantity of color for deceiving in the zone is made as B1.
So analogize, go through all over the whole right zone of statistics, last statistical regions be that (x-c, 0) upper left (x-c, y) bottom right (x, 0) upper right (x, y), last value is Bn down on a left side.
Should be at most for black picture element quantity based on color in the zone that is printed with identification informations such as complete Unionpay, compare B0, B1; ...; Bn gets wherein maximal value, and compares (to be to suppose to be the basic blank magnetic card in a surface with the purpose of threshold values comparison with preset threshold values B; Be peaked zone through picture element quantity still occurring after the above-mentioned statistics; But obviously such statistics is invalid), greater than threshold values B then the zone at maximal value place be the target area that is printed with signs such as Unionpay, then do not have the target area less than threshold values A.
S2: behind the target area of positioning mark information, detection and location are carried out in identification information zone wherein.
The idiographic flow that detects is:
The coordinate of supposing four angle points in sign target area is a left side following (0; 0), upper left (0, y), bottom right (c, 0), upper right (c; Y) (wherein y is the pixel coordinates value of the normal width 53.98mm conversion of magnetic card image, and c is the pixel coordinates value of the maximum length 20mm conversion of identification pattern).
The length and width of reference identification information (height) dimensional standard is about 20mm * 15mm, and the length and width (height) of setting identification information target area to be detected are of a size of 20mm * 15mm, and the length and width (height) of setting identification information pitch area to be detected are of a size of 20mm * 1mm.
Pressing magnetic card from lower to upper, is that (0, d) (d is the pixel coordinates value of the minimum spacing 1mm conversion of identification information) begins from coordinate; The coordinate of four angle points of statistics be (0, d), (0, d+b), (c; D), (c; D+b) color is made as B0 for black picture element quantity in (wherein b is the pixel coordinates value of the breadth extreme 15mm conversion of identification pattern) zone, compares with preset threshold values B.
Add up its below next-door neighbour four angle points coordinate for (0,0), (0, d), (c, 0), (c, d) color is made as C10 for black picture element quantity in the zone, compares with preset threshold values C.
Add up again its top next-door neighbour four angle points coordinate for (0, d+b), (c, d+b), (0, d+2b), (c, d+2b) color is made as Cr0 for black picture element quantity in the zone, compares with preset threshold values C.
On move a picture element coordinate, count B1, Cl1 and Cr1 as stated above.
So analogize, go through all over statistics whole sign target area, last statistical regions be a left side down (0, y-d-b), upper left (0, y-d), the bottom right (c, y-d-b), upper right (c, y-d), last value is Bn, Cln and Crn.
The differentiation process of sign target-region locating process is following:
Less than threshold values B, show that this zone does not have the characteristic of identification information like Bn, be inactive area, move a picture element coordinate on then and proceed to differentiate;
Greater than threshold values B, but Cln or Crn show that greater than C this zone has the characteristic of identification information like Bn, but there is not the characteristic of identification information spacing in its zone that is close to up and down, still is inactive area, move a picture element coordinate on then to proceed to differentiate;
Like Bn greater than threshold values B and Cln and Crn all greater than C; Show that this zone has the characteristic of identification information; And there is the characteristic of spacing in its zone that is close to up and down; Then should the zone be effective sign target area, behind four angular coordinates of posting field and sign target effective region-counter K=K+1 (initial value is 0), on move a picture element coordinate and proceed to differentiate.
As traveling through the whole effective coverage of statistics, K<threshold values I (default value I=1, promptly magnetic card should have an identification information at least) shows the effective sign target area that does not exist or do not have sufficient amount.
In testing process,, then stop to detect like K>threshold values H (default value H=3, promptly magnetic card is no more than three identification informations).
S3: after accomplishing a zone to be detected, whether relatively identify effective coverage counter K greater than threshold values H (default value H=3), as detecting greater than then stopping, execution in step S8 is as less than then proceeding following steps.
S4: judge whether current area coordinate to be detected is last statistical regions coordinate, then carries out S8 in this way, as not being then to proceed following steps.
S5: identified areas cutting.
Cutting is carried out in detected sign target area; And the white space around will identifying removes; Cut out the actual effective coverage (size in zone should be consistent with the identification information size of the standard of storing) of sign, form a new image that comprises an identification pattern information.
S6: the identification image after the cutting is by the numbering storage.
Each identification information is expressed as Q1, Q2...Qn, and wherein Q1 representes detected first identification information, Qn representes detected last identification information, n<=3 (identification information on the normal bank magnetic stripe card is no more than 3).
S7: whether relatively identify effective coverage counter K less than threshold values I (default value I=1), as being zero, as detecting execution in step S8 greater than then stopping less than then putting the sign comparison result.
S8: with all identification information output.
Fig. 3 is the synoptic diagram that from image information, extracts identification information, the process example of visible whole extraction from Fig. 3.
Fig. 9 is the structured flowchart of the identification information comparing unit in the embodiment of the invention, can be known by Fig. 9, and the identification information comparing unit comprises:
Coordinate figure is confirmed unit 30321, is used for the coordinate figure at the identification information of definite identification information that extracts of coordinate system and standard;
Pixel difference is confirmed unit 30322, is used for confirming the pixel difference of the identification information of identification information that same coordinate figure place extracts and standard;
Matching result is confirmed unit 30323, is used for confirming according to described pixel difference the matching result at same coordinate place;
Comparison result generation unit 30324 is used for generating comparison result according to the shared ratio of the successful pixel of matching result coupling.
The identification information comparing unit adopts image comparison technology to the comparison process of identification informations such as Unionpay, and detailed process is following:
The identification information of tentative standard is A (total pixel number is E); The identification information to be compared of current extraction is B; The image size dimension of two identification informations is all identical, and identification information to be compared is process gradation conversion, binaryzation, noise reduction is level and smooth and cutting etc. handled the frame of back extraction, the at first coordinate figure of definite two width of cloth images in coordinate system; Then each picture element An of same coordinate in two width of cloth images and the pixel number of Bn are carried out additive operation, draw difference Cn; Work as Cn=0, then expression is mated successfully, generates the successful matching result of coupling, match counter D=D+1 (D initial value=0), otherwise, generate the matching result that matees failure; At last with the value of D/E and threshold values F (the default value F=90% that presets; Also can preestablish according to different application scenes) compare; If D/E, then generates the successful comparison result of current identification information comparison greater than threshold values F, current identification information is effective identification pattern; As less than reservation threshold, then generate the comparison result of current identification information comparison failure, current identification information is invalid identification pattern.
Figure 10 is the structured flowchart of the another kind of embodiment of the master control set in the embodiment of the invention, can be known by Figure 10, and described master control set comprises:
Numerical information recognition unit 3033 is used for extracting numerical information from described image information, and the characteristic information that extracts is discerned.Characteristic information extraction from image information specifically comprises: S1: carry out the detection and location of numerical information target area.
Relevant regulations according to People's Bank of China; Magnetic card and magnetic card be manufactured with unified standard; The length and width of common magnetic card (height) dimensional standard is 85.60mm * 53.98mm (allowing certain error), and signature identifications such as card number information consistent with magnetic track information and Unionpay must be printed in the magnetic card surface.
Wherein card number information generally is printed on the central region of magnetic card, and each digital length and width (height) dimensional standard is about 3mm * 5mm in the card number, the about 1mm of word space, and the reference position of first digit is in magnetic card left end 10mm scope.Card number length is the 16-19 position.
For accelerating processing speed, at first detection and location are carried out to realize Region Segmentation in the numerical information zone of printing card number in the image information of magnetic card to the numerical information of card number.
The detailed process of detection and location is:
Time three equal parts during the image information of magnetic card is divided into by wide (height) degree direction; The length and width (height) of setting zone line are of a size of 85.60mm * 18mm, and the coordinate of four angle points is a left side (0,0), upper left (0 down; Y), bottom right (x; 0), upper right (x, y) (wherein x is the pixel coordinates value of the standard length 85.60mm conversion of magnetic card image, and y is the pixel coordinates value of the 1/3 normal width 18mm conversion of magnetic card image).
Length and width (height) dimensional standard with reference to the card number numeral is about 3mm * 5mm, and the length and width (height) of setting card number target area to be detected are of a size of 85.60mm * 7mm (on former card number digital standard height basis, respectively increasing 1mm up and down).From coordinate is (0,0) beginning, and the coordinate of four angle points of statistics is (0; 0), (0; B), (x, 0), (x, b) in the zone color (wherein b is the pixel coordinates value of the calibrated altitude 5mm+2mm conversion of card number numeral for black picture element quantity; Promptly on primary standard height basis, respectively increase 1mm up and down), be made as A0.
On move a picture element coordinate, be (0,1) point from coordinate, the coordinate that continues four angle points of statistics be that (0,1) (0, b+1) (x, 1) (x, b+1) the picture element quantity of color for deceiving in the onesize zone is made as A1.
So analogize, go through all over the whole zone line of statistics, the coordinate of four angle points of last statistical regions be a left side down (0, y-b), upper left (0, y), the bottom right (x, y-b), upper right (x, y), last value is An.
Should be at most for black picture element quantity based on color in the zone that is printed with complete card number, compare A0, A1; ..., An gets wherein maximal value; And compare with preset threshold values A and (to be to suppose the basic blank magnetic card in a surface with the purpose of threshold values comparison; Be peaked zone through picture element quantity still occurring after the above-mentioned statistics, but obviously such statistics is invalid), then be the target area of printing card number in the zone at maximal value place greater than threshold values A.Then there is not the target area less than threshold values A.
Through the screening maximal value and with threshold values relatively to the detecting and locating of target area of printing card number.Detect effective and unique target area and then continue following steps, detect less than the then direct execution in step S9 in effective target area.
S2: behind card number target area, location, detection and location are carried out in digital object zone wherein.
The concrete grammar that detects is:
Length and width (height) in the card number target area, back, location are of a size of 85.60mm * 7mm; The coordinate of four angle points is a left side following (0; 0), upper left (0, b), bottom right (x, 0), upper right (x; B) (wherein x is the pixel coordinates value of the normal width 85.60mm conversion of magnetic card image, and b is the pixel coordinates value of the calibrated altitude 5mm+2mm conversion of card number numeral).
Length and width (height) dimensional standard with reference to the card number numeral is about 3mm * 5mm; The length and width (height) of setting digital object zone to be detected are of a size of 4mm * 7mm (about on the former card number digital standard length basis, respectively increasing 0.5mm), and the length and width (height) of setting digital pitch area to be detected are of a size of 0.5mm * 7mm.
Being pressed into the card direction by from left to right, is (d, 0) (d is the pixel coordinates value of the 1/2 standard word spacing 0.5mm conversion of card number numeral) beginning from coordinate; The coordinate of four angle points of statistics be (d, 0), (d, b), (d+c; 0), (d+c, b) color is black picture element quantity in (c is the pixel coordinates value of the standard length 3mm+1mm conversion of card number numeral, promptly on primary standard length basis about respectively increase 0.5mm) zone; Be made as B0, compare with preset threshold values B.
Add up its left side next-door neighbour four angle points coordinate for (0,0), (0, b), (d, 0), (d, b) color is made as Cl0 for black picture element quantity in the zone, compares with preset threshold values C.
Add up again its right side next-door neighbour four angle points coordinate for (d+c, 0), (d+c, b), (d+c+d, 0), (d+c+d, b) color is made as Cr0 for black picture element quantity in the zone, compares with preset threshold values C.
The picture element coordinate that moves to right counts B1, Cl1 and Cr1 as stated above.
So analogize, go through all over statistics whole card number effective coverage, last statistical regions be a left side down (x-c-d, 0), upper left (x-c-d, b), bottom right (x-c, 0), it is upper right that (x-c, b), last value is Bn, Cln and Crn.
Less than threshold values B, show that this zone does not have the characteristic of digital picture like Bn, be inactive area, the picture element coordinate that then moves to right is proceeded to differentiate.
Greater than threshold values B, but Cln or Crn show that greater than C this zone has the characteristic of digital picture like Bn, but there is not the characteristic of character pitch in its left and right sides next-door neighbour's zone, still be inactive area, and the picture element coordinate that then moves to right is proceeded differentiation.
Like Bn greater than threshold values B and Cln and Crn all greater than C; Show that this zone has the characteristic of digital picture; And there is the characteristic of character pitch in its left and right sides next-door neighbour's zone; Should the zone be effective digital object zone then, behind four angular coordinates of posting field and digital object effective coverage counter D=D+1 (initial value is 0), the picture element coordinate that moves to right be proceeded to differentiate.
As traveling through the whole effective coverage of statistics, D<threshold values F (default value F=8, promptly the digital object region quantity of location should be no less than the half the of 16 standard card number length) shows the effective digital object zone that does not exist or do not have sufficient amount.
In testing process, like D>threshold values E (default value E=19, the i.e. maximum length of card number), show that the digital object region quantity of location exceeds the card number maximum length, then stop to detect.
S3: after accomplishing a zone to be detected, whether comparative figures effective coverage counter D greater than threshold values E (default value E=19), and as detecting greater than then stopping, execution in step S7 is as less than then continuing following steps.
S4: judge whether current area coordinate to be detected is last statistical regions coordinate, execution in step S7 then in this way is not as being then to proceed following steps.
S5: to the numeric area cutting.
Cutting is carried out in detected digital object zone, and the white space around the numeral is removed, cut out the actual effective coverage of numeral, form a new image that comprises a digital graphical information.
S6: the digital picture after the cutting is by the numbering storage.
Each digital image representation is P1, P2...Pn, and wherein P1 representes detected first digit image, Pn representes detected last card number digital picture, n<=19.
S7: whether comparative figures target effective region-counter D less than threshold values F (default value F=8), as less than execution in step S9 then, as greater than then stopping detection and location, execution in step S8.
S8: with all digital picture output.
S9: putting the card number comparison result is 0.
Described master control set also comprises: numerical information comparing unit 3034 is used for the numerical information of numerical information of extracting and the standard generation comparison result of comparing.
Figure 11 is the structured flowchart of the numerical information recognition unit in the embodiment of the invention, can be known by Figure 11, and the numerical information recognition unit comprises:
Region Segmentation unit 30331 is used for described numerical information is carried out Region Segmentation, promptly the digital picture of cutting is cut apart, and for example is divided into 3*5 zone, and each regional area equates, below is that example describes with 15 zones just.
Pixel ratio is confirmed unit 30332, is used for confirming the shared ratio value of black picture element in each zone; Density value is confirmed unit 30333, is used for confirming according to described ratio value the density value of numerical information.The concrete implementation procedure in this Unit two comprises: the number of in each zone, calculating black pixel point; According to shared number percent; Assignment 0-10 so forms 15 density attributes values as this regional density respectively, carries out the characteristic of digit recognition as digital picture with this.
Figure 17 is 15 density attributes values of numeral 3,4,5,6, can be known by Figure 17, and 15 density attributes values of numeral 3 to be identified, numeral 4, numeral 5 and numeral 6 are diverse.
The density definition of the numerical information of standard: the density attributes value of these 10 numerals of digital 0-9 respectively being set one group of standard.Figure 16 is the standard density of numeral 0,3,4, and 1,2,5,6,7,8,9 standard density here no longer similarly repeats no more here.
Numerical information extraction unit 30334 is used for extracting according to described density value the numerical information of described image information.The implementation procedure of numerical information extraction unit is following to be that example describes with the numeral among Figure 17 3:
In Figure 17,15 density attributes values of numerical information 3 to be identified are made as A-1 respectively, A-2...A-15,
15 standard density property values of the numerical information 3 of the standard among Figure 16 are respectively B3-1; B3-2...B3-15; 15 standard density property values of the numerical information 4 of standard are respectively B4-1, B4-2...B4-15, and other digital standard density property values are by that analogy.
Preestablish difference threshold values D=2.
The difference of 15 standard attribute values that 15 property values that calculate digital picture to be identified and numeral 0 are corresponding, and take absolute value, draw C0-1;, C0-2...C0-15, this array compares with difference threshold values D respectively; Suppose C0-n<=D, show that this zone to be identified and standard attribute value are identical, then goodness of fit counter E0=E0+1 (initial value is 0); By that analogy, draw E0=7 at last;
Similarly, the comparison of 15 standard attribute values that 15 property values that carry out image to be identified and numeral 3 are corresponding draws E3=10 at last.
Similarly, the comparison of 15 standard attribute values that 15 property values that carry out image to be identified and numeral 4 are corresponding draws E4=6 at last.
In like manner, carry out the comparison of 15 property values of image to be compared, 15 the standard attribute values corresponding, draw E1, E2......E9 with other numerals.
Screening maximal value wherein from E0, E1, E2......E9, maximal value is E3=10 among this embodiment.
If have only a maximal value in the results of screening, then its corresponding digital numerical value is recognition result, also is that the present embodiment kind is 3 to the numerical information of discerning, as filters out the maximal value that equates more than two, then shows and can't discern.Fig. 5 intuitively shows the course of work of from image information, extracting numerical information with graphics mode.
Figure 12 is the structured flowchart of the numerical information comparing unit in the embodiment of the invention, can be known by Figure 12, and the numerical information comparing unit comprises:
First numbered cell 30341 is used for the numerical information of standard is numbered processing, and the card number length of bank is generally 16 to 19, so number consecutively is M1, M2......Mn, and meter card number length is Q.The numerical information of standard is for to read the card number information that transmits behind the current magnetic card by bank self-aid apparatus here.
Second numbered cell 30342 is used for numerical information is numbered processing.
The numerical information of extracting also is generally 16 to 19, and number consecutively is P1, P2......Pn, if any the numeral that can't discern, then stores with numeral 99 in the numerical information, and for example image P3 can't discern, then P3=99.
Matching result is confirmed unit 30343, is used for the numerical information of same numbering and the numerical information of standard are mated the generation matching result.Promptly mate, for example P1 and M1 are mated, confirm whether P1 equals M1 by the corresponding order of numbering; When P1=M1; Then generate the successful matching result of coupling, numerical information match counter P=P+1 (initial value is 0), otherwise generate the matching result that coupling is failed.
Comparison result generation unit 30344 is used for comparing successfully shared ratio according to matching result and generates comparison result.
Promptly after accomplishing all digital coupling, calculate P/Q, the value with P/Q compares with preset threshold values F at last, if P/Q greater than threshold values F, then generates the successful comparison result of current digit information comparison, current digit information is effective digital pattern; As less than reservation threshold, then generate the comparison result of current digit information comparison failure, current digit information is invalid digital pattern.
Figure 13 is the structured flowchart of the embodiment three of the master control set in the embodiment of the invention, can be known by Figure 13, and described master control set also comprises:
Screen unit 3035, be used for generating the examination result of the magnetic card of user's insertion according to comparison result.Screening the unit can realize through following three kinds of embodiments:
1, when characteristic information only comprises numerical information, the comparison result of generation thinks that then current numerical information is digital pattern effectively when comparing successfully, and generating current magnetic card is the examination result of effective magnetic card; The comparison result that generates is during for the comparison failure, thinks that then current numerical information is digital pattern ineffectually, and generating current magnetic card is the examination result of invalid magnetic card.
2, when characteristic information only comprises identification information, the comparison result of generation is when comparing successfully, to think that then current identification information is effective identification pattern, and generating current magnetic card is the examination result of effective magnetic card; When the comparison result that generates is failed for comparison, think that then current identification information is invalid identification pattern, generating current magnetic card is the examination result of invalid magnetic card.
3, when characteristic information comprises numerical information and identification information, this moment, the examination result of magnetic card needed to judge through the coupling of numerical information and these two key elements of identification information simultaneously, therefore needed the preset weighted value of the comparison result of these two key elements.
Wherein the weighted value of numerical information is made as X (initial value is 0.7, can set), and the weighted value of identification information is made as Y and (works as D/E=1; Initial value Y=0.2; When D/E>1, initial value Y=0.3, expression detects the credibility Du Genggao of two signs than a sign simultaneously).
If Z is the magnetic card effective value, then
Z=X * P/Q+Y * D/E works as D/E=1, Z=0.7 * P/Q+0.2 * D/E
Z=X * P/Q+Y * D/E, when D/E>1, Z=0.7 * P/Q+0.3 * D/E
Judge the size of magnetic card effective value Z and the effective threshold values Zs of magnetic card (initial value is 0.7), Z is during greater than threshold values, and then differentiating magnetic card is effective magnetic card, and promptly generating current magnetic card is the examination result of effective magnetic card; Z is during less than threshold values, and differentiating magnetic card is invalid magnetic card, and generating current magnetic card is the examination result of invalid magnetic card.
Storer 3036 be used to store the characteristic information of identification information of the numerical information that comprises standard and/or the standard of bank self-aid apparatus, and the result is screened in storage.
Figure 15 is the structure diagram of the master control set in the embodiment of the invention, specifically describes as follows:
(1) central processing unit of master control set is a microprocessor.
(2) the I/O interface of master control set is responsible for the input reception of inductor signal, the input reception of photographed images data, the output of motor control signal, the output of shooting control signal and the output function of LED floor light control signal.
(3) communication bus of master control set is the RS232 universal serial bus, is responsible for carrying out communication with bank self-aid apparatus.
(4) computing of master control set mainly realizes the function such as identification and comparison calculation, examination computing of identification information identification and comparison calculation, numerical information.
(5) storer of master control set is mainly stored data such as operation result, image and systematic parameter.
In sum; The invention has the beneficial effects as follows: a kind of method, Apparatus and system of screening bank magnetic stripe card is provided; Through the device of screening bank magnetic stripe card is installed on bank self-aid apparatus; Can discern the magnetic card of forgery effectively, stop offender's further criminal activity, greatly improve user's property safety.
Advantage of the present invention is:
1. creatively through analyzing a large amount of forgery magnetic cards of the same type; Forge no any pattern on the magnetic card according to these; On magnetic card, print during also not by issued by banks with magnetic track in the characteristic information that identifies of card number information and Unionpay, MASTER and the VISA of card number coupling; A kind of device of screening bank magnetic stripe card is provided, through gathering the image information of current magnetic card, and the validity of the current magnetic card of standard feature information discriminating that transmits according to the image information of gathering and bank self-aid apparatus; The accuracy rate of not only screening is high, and method of application, quick.
2. a kind of system of screening bank magnetic stripe card creatively is provided; The device of screening magnetic card is arranged on each bank self-aid apparatus; Through characteristic informations such as the card number of identification on the magnetic card and Unionpay, and the information that combines the bank self-aid apparatus card reader to read compares, thereby whether screen magnetic card effectively is to forge to block; And in time send warning message or shut the book; Solve bank self-aid apparatus of the prior art and can't screen the bank magnetic stripe card true and false, and then given offender's opportunity, caused the problem of direct economic loss to the client.
Used specific embodiment among the present invention principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that on embodiment and range of application, all can change, in sum, this description should not be construed as limitation of the present invention.

Claims (20)

1. a method of screening bank magnetic stripe card is characterized in that, described method comprises:
Gather the image information of the magnetic card of user's insertion;
Characteristic information extraction from described image information;
Obtain the characteristic information of standard from bank self-aid apparatus;
With the characteristic information of the characteristic information of said extraction and the standard generation comparison result of comparing;
Generate the examination result of the magnetic card of user's insertion according to described comparison result.
2. method according to claim 1 is characterized in that, described characteristic information comprises: numerical information and/or identification information.
3. method according to claim 2 is characterized in that, when characteristic information was identification information, characteristic information extraction comprised from described image information:
Described image information is carried out gradation conversion to be handled;
Described image information is carried out binary conversion treatment;
Described image information is carried out the noise reduction smoothing processing;
Extract identification information the image information after handling.
4. method according to claim 2 is characterized in that, when characteristic information was numerical information, characteristic information extraction comprised from described image information: characteristic information extraction from image information; Described characteristic information is discerned; Wherein, described characteristic information discerned comprised:
Described numerical information is carried out Region Segmentation;
Confirm the shared ratio value of black picture element in each zone;
Confirm the density value of numerical information according to described ratio value;
Extract the numerical information of described image information according to described density value.
5. method according to claim 3 is characterized in that, when characteristic information was identification information, the characteristic information of the characteristic information of said extraction and standard compared to be generated comparison result and comprise:
The coordinate figure of the identification information of definite identification information that extracts and standard in coordinate system;
Confirm the pixel difference of the identification information of identification information that same coordinate figure place extracts and standard;
Confirm the matching result at same coordinate place according to described pixel difference;
The ratio shared according to the successful pixel of coupling in the matching result generates comparison result.
6. method according to claim 4 is characterized in that, when characteristic information was numerical information, the characteristic information of the characteristic information of said extraction and standard compared to be generated comparison result and comprise:
Numerical information to standard is numbered processing;
Numerical information is numbered processing;
The numerical information of same numbering and the numerical information of standard are mated the generation matching result;
Generate comparison result according to comparing successfully shared ratio in the matching result.
7. a device of screening bank magnetic stripe card is characterized in that, described device comprises:
Image acquisition units is used to gather the image information of the magnetic card that the user inserts, and described image information is transferred to master control set;
Communication interface is used for the characteristic information of the standard of obtaining from bank self-aid apparatus;
Described master control set is used for from described image information characteristic information extraction, generates the examination result of the magnetic card of user's insertion according to the characteristic information of described characteristic information and standard.
8. device according to claim 7 is characterized in that described image collecting device comprises camera.
9. device according to claim 8 is characterized in that described image collecting device also comprises lighting device.
10. device according to claim 7 is characterized in that, described characteristic information comprises: numerical information and/or flag information.
11. device according to claim 7 is characterized in that, described master control set comprises:
The identification information recognition unit is used for extracting identification information from described image information;
The identification information comparing unit is used for the flag information of flag information that extracts and the standard generation comparison result of comparing.
12. device according to claim 11 is characterized in that, described identification information recognition unit comprises:
Gradation conversion unit is used for that described image information is carried out gradation conversion and handles;
The binary conversion treatment unit is used for described image information is carried out binary conversion treatment;
The noise reduction smooth unit is used for described image information is carried out the noise reduction smoothing processing;
The identification information extraction unit, the image information that is used for after handle is extracted identification information.
13. device according to claim 11 is characterized in that, described identification information comparing unit comprises:
Coordinate figure is confirmed the unit, is used for the coordinate figure at the identification information of definite identification information that extracts of coordinate system and standard;
Pixel difference is confirmed the unit, is used for confirming the pixel difference of the identification information of identification information that same coordinate figure place extracts and standard;
Matching result is confirmed the unit, is used for confirming according to described pixel difference the matching result at same coordinate place;
The comparison result generation unit is used for generating comparison result according to the shared ratio of the successful pixel of matching result coupling.
14. device according to claim 7 is characterized in that, described master control set also comprises:
The numerical information recognition unit is used for extracting numerical information from described image information;
The numerical information comparing unit is used for the numerical information of numerical information of extracting and the standard generation comparison result of comparing.
15. device according to claim 14 is characterized in that, described numerical information recognition unit comprises:
The Region Segmentation unit is used for described numerical information is carried out Region Segmentation;
Pixel ratio is confirmed the unit, is used for confirming the shared ratio value of black picture element in each zone;
Density value is confirmed the unit, is used for confirming according to described ratio value the density value of numerical information;
The numerical information extraction unit is used for extracting according to described density value the numerical information of described image information.
16. device according to claim 14 is characterized in that, described numerical information comparing unit comprises:
First numbered cell is used for the numerical information of standard is numbered processing;
Second numbered cell is used for numerical information is numbered processing;
Matching result is confirmed the unit, is used for the numerical information of same numbering and the numerical information of standard are mated the generation matching result;
The comparison result generation unit is used for comparing successfully shared ratio according to matching result and generates comparison result.
17., it is characterized in that described master control set also comprises according to claim 13 or 16 described devices:
Screen the unit, be used for generating the examination result of the magnetic card of user's insertion according to comparison result;
Storer be used to store the characteristic information of identification information of the numerical information that comprises standard and/or the standard of bank self-aid apparatus, and the result is screened in storage.
18. device according to claim 7 is characterized in that, described device also comprises: conveyer is used for transmitting the magnetic card that the user inserts to bank self-aid apparatus.
19. device according to claim 7 is characterized in that, described device also comprises:
Inductor is used to respond to the bank magnetic stripe card that the user inserts.
20. a system of screening bank magnetic stripe card is characterized in that, described system comprises:
Bank self-aid apparatus comprises: card reader, main control unit and communication interface;
Data transmission interface, the device that is used to connect described bank self-aid apparatus and screen bank magnetic stripe card is to carry out data transmission;
Screen the device of bank magnetic stripe card, comprising: image acquisition units is used to gather the image information of the magnetic card that the user inserts, and described image information is transferred to master control set;
Communication interface is used for the characteristic information of the standard of obtaining from bank self-aid apparatus;
Described master control set is used for from described image information characteristic information extraction, generates the examination result of the magnetic card of user's insertion according to the characteristic information of described characteristic information and standard.
CN2011103169605A 2011-10-18 2011-10-18 Method, device and system for discriminating bank magnetic card Pending CN102364526A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011103169605A CN102364526A (en) 2011-10-18 2011-10-18 Method, device and system for discriminating bank magnetic card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011103169605A CN102364526A (en) 2011-10-18 2011-10-18 Method, device and system for discriminating bank magnetic card

Publications (1)

Publication Number Publication Date
CN102364526A true CN102364526A (en) 2012-02-29

Family

ID=45691092

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011103169605A Pending CN102364526A (en) 2011-10-18 2011-10-18 Method, device and system for discriminating bank magnetic card

Country Status (1)

Country Link
CN (1) CN102364526A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103646328A (en) * 2013-12-06 2014-03-19 上海众人网络安全技术有限公司 Camera-based security payment method
CN104573590A (en) * 2014-12-31 2015-04-29 福建联迪商用设备有限公司 Method for detecting magnetic read and magnetic card testing device
CN105139051A (en) * 2015-09-24 2015-12-09 广东曙光自动化设备股份有限公司 IC card information detection method and detection system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6293752A (en) * 1985-10-18 1987-04-30 Omron Tateisi Electronics Co Card truth discriminating device
CN1173234A (en) * 1994-12-05 1998-02-11 小查尔斯A·博格希恩 System for varifying use of a credit/identification card including recording of physical attributes of unauthorized users
CN201359737Y (en) * 2009-02-17 2009-12-09 宋宝富 Automatic identification device for invoice
US20100097180A1 (en) * 2008-10-21 2010-04-22 Cardullo Mario W System and method for credit card user identification verification
CN101799945A (en) * 2010-03-10 2010-08-11 浙江大华安防联网运营服务有限公司 Self-service bank safety door control method based on image identification

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6293752A (en) * 1985-10-18 1987-04-30 Omron Tateisi Electronics Co Card truth discriminating device
CN1173234A (en) * 1994-12-05 1998-02-11 小查尔斯A·博格希恩 System for varifying use of a credit/identification card including recording of physical attributes of unauthorized users
US20100097180A1 (en) * 2008-10-21 2010-04-22 Cardullo Mario W System and method for credit card user identification verification
CN201359737Y (en) * 2009-02-17 2009-12-09 宋宝富 Automatic identification device for invoice
CN101799945A (en) * 2010-03-10 2010-08-11 浙江大华安防联网运营服务有限公司 Self-service bank safety door control method based on image identification

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103646328A (en) * 2013-12-06 2014-03-19 上海众人网络安全技术有限公司 Camera-based security payment method
CN104573590A (en) * 2014-12-31 2015-04-29 福建联迪商用设备有限公司 Method for detecting magnetic read and magnetic card testing device
CN104573590B (en) * 2014-12-31 2017-07-25 福建联迪商用设备有限公司 A kind of method and magnetic card test device for being used to detect magnetic head
CN105139051A (en) * 2015-09-24 2015-12-09 广东曙光自动化设备股份有限公司 IC card information detection method and detection system

Similar Documents

Publication Publication Date Title
JP6878575B2 (en) Banknote management methods, systems, programs and recording media
CN101809631B (en) Paper sheet processor
CN102222384B (en) Analysis method of multispectral image of note
CN107180479B (en) Bill identification method, device, equipment and storage medium
CN105184957A (en) Paper currency discrimination method and system
CN103512762A (en) Image processing method and device and train fault detection system
CN107331031B (en) A kind of recognition methods of note denomination, device, equipment and storage medium
CN102542660A (en) Bill anti-counterfeiting identification method based on bill watermark distribution characteristics
CN104145278A (en) Label for product authentication, method for generating authentication code of label, method and system for authenticating label, portable terminal for authenticating label, and computer-readable recording medium for authenticating label
CN202257774U (en) Device and system for screening magnetic bank card
CN104680130A (en) Chinese character recognition method for identification cards
CN105069900A (en) Method and device for processing banknote information
CN103617673A (en) Ultraviolet image characteristic-based check true and false identification system and method
CN106920318B (en) Method and device for identifying paper money
CN104700510A (en) Intelligent express box system and delivery method
CN107610322A (en) Recognition methods, device, electronic equipment and the storage medium of bank note version
CN103606220A (en) Check printed number recognition system and check printed number recognition method based on white light image and infrared image
CN102096960A (en) Bill currency count machine system and method
CN102364526A (en) Method, device and system for discriminating bank magnetic card
CN104574636A (en) Bill mandarin-duck-number recognition and check system
CN104050749A (en) Method for making judgment by automatically selecting different feature points of banknotes
CN107358718A (en) A kind of crown word number identification method, device, equipment and storage medium
CN108269349A (en) A kind of bill handling method, apparatus, equipment and storage medium
CN103903329A (en) Financial instrument authenticity identification device with front CIS
CN109543554B (en) Bill detection method, device, terminal and computer readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20120229