A kind of false distinguishing method of bank note magnetic signalTechnical field
The present invention relates to currency recognition field, refer in particular to the false distinguishing method of a kind of bank note magnetic signal on equipment such as being applied in ATM in bank, cash recycling system, cleaning-sorting machine.
Background technology
At present, for the detect counterfeit money machine on the equipment such as ATM in bank, cash recycling system, cleaning-sorting machine, mainly contain the functions such as false distinguishing, sorting, crown word number identification, abnormal data preservation.Due to magnetic ink intrinsic on bank note and magnetic stripe, therefore utilize Magnetic Sensor to carry out the crawl of bank note magnetic signal, and then design is based on the false distinguishing method of magnetic signal, as one of bank note important false distinguishing means.Current detect counterfeit money machine, for the design of magnetic algorithm, (1) mostly all do not have the recognition result of fused images (or just the simple value of money that merges towards version information, and do not merge the spatial positional information of bank note), just location magnetic stripe rough in magnetic signal field and size magnetic patch, the calculating of magnetic feature must be caused not to be fine, and then to exacerbate rate of false alarm, the Leakage Resolution of paper money recognition.(2) at present for the analysis of magnetic stripe signal characteristic, be all based on spatial domain, the power in conjunction with magnetic signal judges.Due to bank note cross detect counterfeit money machine time, float indefinite, bank note range sensor distance has distance, can affect the power of magnetic signal, therefore pure in Spatial domain analysis magnetic signal, and feature is inevitable unstable.(3) due to bank note turnover detect counterfeit money machine, the moment starting Magnetic Sensor collection magnetic signal is not fixed, and the frontier distance causing bank note magnetic stripe signal distance to gather magnetic signal is not fixed.
Summary of the invention
The object of the invention is to overcome space orientation that in prior art, detect counterfeit money machine is identified bank note, magnetic signal acquisition is inaccurate, the defect causing the leakage of bank note to distinguish, report by mistake, provides a kind of false distinguishing method of bank note magnetic signal.
The object of the invention is to be achieved by following technical proposals:
A false distinguishing method for bank note magnetic signal, based on the detect counterfeit money machine of automatic depositing-withdrawing all-in-one, comprises the following steps:
Step 1, when bank note is through detect counterfeit money machine, detect counterfeit money machine gathers view data and the magnetic data of bank note;
Step 2, detect counterfeit money machine locates the concrete coordinate position of magnetic stripe in field signal, obtains magnetic stripe signal message;
Step 3, detect counterfeit money machine carries out Fourier transform to magnetic stripe signal and obtains energy spectrum, and chooses the energy spectrum feature of fixing frequency, the energy spectrum feature of energy spectrum feature and true bank note is compared, the true and false of identification note.
Detect counterfeit money machine can according to view data calculate bank note value of money, towards Back ground Informations such as, version, locus, magnetic stripe coordinate positions in the picture, then according to Back ground Information magnetic stripe coordinate position in the picture, the concrete scaling that combining image is corresponding with magnetic, the particular location of location magnetic stripe in magnetic data.Combining image sensor and the Magnetic Sensor relativity shift position of installing, just can calculate the particular location of magnetic stripe in magnetic data by image again.
The discriminating principle of magnetic stripe signal is based on Fourier spectrum feature.Magnetic stripe signal message is x (j), j=0,1,2 ... M, j represent the line number split in image, and M represents maximum line number value.Through formula 1 Fourier transform to X (k), k=0,1,2 ... M.X (k) is plural number, is made up of, k=0,1,2 a (k)+b (k) * i ... M.
Formula 1
Calculate energy spectrum by formula 3, then be normalized by formula 4 pairs of energy spectrums.Bank note for different value of money, different editions selects energy spectrum d (k1), the d (k2) of two fixing frequencies different in d (k) to differentiate the true and false of magnetic stripe signal as unique point.
Formula 3
D (k)=c (k)/c (0), k=0,1,2...M formula 4
As a kind of preferred version, step 2 also comprises when the concrete coordinate position of locating magnetic stripe occupies multiple passage, needs to carry out splicing to the magnetic strip information of multiple passage.When the magnetic stripe position calculated occupies two or three passages, magnetic signal signal in each channel can die down, and affects the judgement of magnetic stripe.Need each passage is interrupted or signal to have the carrying out of repetition to extract and be spliced into magnetic stripe normal through situation during single passage.
As a kind of preferred version, step 2 also comprises the concrete coordinate position of the multiple magnetic patch obtaining different size on bank note;
The false distinguishing method of bank note magnetic signal also comprises step 4, and the concrete coordinate position for multiple magnetic patch is respectively asked for respective average and variance respectively, and the average of multiple magnetic patch of average and variance and true bank note and variance is compared, the true and false of identification note.
After magnetic stripe position determines, large and small magnetic patch is fixing relative to the position of magnetic stripe, then in conjunction with value of money, version just accurately can know the particular location of size magnetic patch.
Calculate average and the variance of magnetic patch respectively according to formula 5, formula 6, wherein sr, er represent the begin column of size magnetic patch in magnetic data array, end line; Sc, ec represent the begin column of size magnetic patch in magnetic data array, end column, and MAG represents the intensity level in i row, the capable magnetic of j number.
Formula 5
Formula 6
As a kind of preferred version, the false distinguishing method of bank note magnetic signal also comprises step 5, detect counterfeit money machine detects the region outside magnetic stripe and multiple magnetic patch, judge whether the number of the magnetic signal in the region outside magnetic stripe and multiple magnetic patch exceeds the threshold value of setting, if number exceeds the threshold value of setting, then judge that the region magnetic signal outside magnetic stripe and multiple magnetic patch is abnormal, if number does not exceed the threshold value of setting, then judge that the region magnetic signal outside magnetic stripe and multiple magnetic patch is normal.Normal expression bank note is true, and abnormal expression bank note is pseudo-.
As a kind of preferred version, step 3 also comprises:
Sub-step 3a, detect counterfeit money machine carries out carrying out analog to digital conversion after Fourier transform obtains energy spectrum to magnetic stripe signal, obtains the first digital signal data;
Sub-step 3b, by bank note reverses through detect counterfeit money machine, repeats step 1 to step 2, and then detect counterfeit money machine carries out carrying out analog to digital conversion after Fourier transform obtains energy spectrum to magnetic stripe signal, obtains the second digital signal data;
Sub-step 3c, makes comparisons the first digital signal data and the difference of the second digital signal data and the difference of true bank note, the true and false of identification note.
The method can detect magnetic stripe, whether the position of magnetic patch is in normal position, and the discrimination condition of increase further increases the accuracy of detect counterfeit money machine discriminating.
The invention has the beneficial effects as follows:
(1) the present invention is in conjunction with the image space positions information of bank note, bank note magnetic stripe, the particular location of magnetic patch in magnetic signal field can be located more accurately, the bank note magnetic signal feature calculated is more stable, thus can reduce rate of false alarm, the Leakage Resolution of paper money recognition.
(2) magnetic signal of magnetic stripe is carried out to the spectrum sigtral response of frequency field, be the frequency spectrum of magnetic stripe magnetic signal due to what analyze, so bank note floats, the indefinite power of magnetic stripe magnetic signal that causes is indefinite, can not affect the spectrum analysis of magnetic stripe magnetic signal.
(3) because Fourier transform itself has TIME SHIFT INVARIANCE, therefore the distance of the collection distance collection frontier distance of bank note magnetic signal can not affect the analysis of magnetic stripe magnetic signal feature.
Accompanying drawing explanation
Fig. 1 is a kind of schematic flow sheet of the present invention.
Embodiment
Below in conjunction with drawings and Examples, the present invention is further described.
Embodiment 1: a kind of false distinguishing method of bank note magnetic signal, its process flow diagram as shown in Figure 1, comprises the following steps:
Step 1, when bank note is through detect counterfeit money machine, detect counterfeit money machine gathers view data and the magnetic data of bank note;
Step 2, detect counterfeit money machine locates the concrete coordinate position of magnetic stripe and multiple magnetic patch in field signal, obtains magnetic stripe signal message, when the concrete coordinate position of locating magnetic stripe occupies multiple passage, needs to carry out splicing to the magnetic strip information of multiple passage; The magnetic space of corresponding 17.5 passages of picture traverse 1220 pixels, the magnetic data of corresponding 100 row of picture altitude 450 pixels.
Step 3, detect counterfeit money machine carries out Fourier transform to magnetic stripe signal and obtains energy spectrum, and chooses the energy spectrum feature of fixing frequency, the energy spectrum feature of energy spectrum feature and true bank note is compared, the true and false of identification note;
Step 4, the concrete coordinate position for multiple magnetic patch is respectively asked for respective average and variance respectively, and the average of multiple magnetic patch of average and variance and true bank note and variance is compared, the true and false of identification note;
Step 5, detect counterfeit money machine detects the region outside magnetic stripe and multiple magnetic patch, judge whether the number of the magnetic signal in the region outside magnetic stripe and multiple magnetic patch exceeds the threshold value of setting, if number exceeds the threshold value of setting, then judge that the region magnetic signal outside magnetic stripe and multiple magnetic patch is abnormal, if number does not exceed the threshold value of setting, then judge that the region magnetic signal outside magnetic stripe and multiple magnetic patch is normal.
Detect counterfeit money machine can according to view data calculate bank note value of money, towards Back ground Informations such as, version, locus, magnetic stripe coordinate positions in the picture, then according to Back ground Information magnetic stripe coordinate position in the picture, the concrete scaling that combining image is corresponding with magnetic, the particular location of location magnetic stripe in magnetic data.Combining image sensor and the Magnetic Sensor relativity shift position of installing, just can calculate the particular location of magnetic stripe in magnetic data by image again.
The discriminating principle of magnetic stripe signal is based on Fourier spectrum feature.Magnetic stripe signal message is x (j), j=0,1,2 ... M, j represent the line number split in image, and M represents maximum line number value.Through formula 1 Fourier transform to X (k), k=0,1,2 ... M.X (k) is plural number, is made up of, k=0,1,2 a (k)+b (k) * i ... M.
Formula 1
Calculate energy spectrum by formula 3, then be normalized by formula 4 pairs of energy spectrums.Bank note for different value of money, different editions selects energy spectrum d (k1), the d (k2) of two fixing frequencies different in d (k) to differentiate the true and false of magnetic stripe signal as unique point.
Formula 3
D (k)=c (k)/c (0), k=0,1,2...M formula 4
Calculate average and the variance of magnetic patch respectively according to formula 5, formula 6, wherein sr, er represent the begin column of size magnetic patch in magnetic data array, end line; Sc, ec represent the begin column of size magnetic patch in magnetic data array, end column, and MAG represents the intensity level in i row, the capable magnetic of j number.
Formula 5
Formula 6
Embodiment 2, a kind of false distinguishing method of bank note magnetic signal, its principle and implementation method substantially the same manner as Example 1, difference is that step 3 also comprises:
Sub-step 3a, detect counterfeit money machine carries out carrying out analog to digital conversion after Fourier transform obtains energy spectrum to magnetic stripe signal, obtains the first digital signal data;
Sub-step 3b, by bank note reverses through detect counterfeit money machine, repeats step 1 to step 2, and then detect counterfeit money machine carries out carrying out analog to digital conversion after Fourier transform obtains energy spectrum to magnetic stripe signal, obtains the second digital signal data;
Sub-step 3c, makes comparisons the first digital signal data and the difference of the second digital signal data and the difference of true bank note, the true and false of identification note.
The method can detect magnetic stripe, whether the position of magnetic patch is in normal position, and the discrimination condition of increase further increases the accuracy of detect counterfeit money machine discriminating.