Summary of the invention
Technical matters to be solved by this invention is: the method for designing that a kind of multispectral bank note cash inspecting machine is provided, this method is analyzed the multispectral image of bank note based on image analysis technology, can realize the real and fake discrimination of higher reliability, can also realize the identification of bank note hat font size simultaneously, and then support banking system to realize the scientific management of fiduciary circulation.
The technical solution adopted in the present invention is: the method for designing of multispectral bank note cash inspecting machine may further comprise the steps successively to the processing of bank note:
S1) image acquisition: after bank note enters cash inspecting machine, at first by photoelectric tube signal and magnetic head signal judge bank note towards, and obtain banknote image with the CIS sensor;
S2) image pre-service: the CIS original image that collects is carried out the pre-service of luminance compensation, bank note rim detection and geometry correction, obtain standardized banknote image;
S3) real and fake discrimination and the identification of hat font size: extract the banknote image feature, bank note is carried out real and fake discrimination, realize the hat font size identification of bank note then based on the method for graphical analysis according to these features;
S4) result's output: real and fake discrimination result or hat font size recognition result send to miscellaneous equipment or parts by RS-232, Ethernet or general purpose I/O signal.
Further, among the step S1, the position that magnetic material distributes on the bank note is detected by magnetic head in the edge, front and back of the photoelectric tube input bank note by cash inspecting machine, according to these information judge bank note towards.
Further, among the step S1, judge bank note towards after, according to the needs of graphical analysis, by the spectrum of CIS interface circuit automatic switchover CIS sensor light source.
Further, among the step S1, when using CIS sensor acquisition image, the color treatments of CIS sensor opposite material is become dark, the contrast in the image that collects with enhancing between bank note and background helps reducing the calculated amount of rim detection.
Further, among the step S2, by the rim detection of the programmable logic device (PLD) in the CIS interface circuit (as CPLD, FPGA etc.) realization bank note, the calculated amount of mitigation system central processing unit (as digital signal processor).
Further, among the step S3, the method for real and fake discrimination is: according to the distributing position of magnetic material on bank note judge bank note towards, again the method by graphical analysis to bank note towards discerning, if the direction determining that two kinds of methods obtain is inconsistent, promptly this bank note of decidable is counterfeit money.
Further, among the step S3, also output on the integrated display screen of cash inspecting machine or other external display device, carry out real and fake discrimination by eye-observation by the multispectral image of video output interface with bank note.
Advantage of the present invention: be applied in the multispectral image analytical equipment of bank note, improve the speed of bill handling, improve the false distinguishing ability of equipment, false distinguishing is effective, the efficient height.Can also orientate the ready work of follow-up hat font size identification as by switching spectrum, realization bank note simultaneously.The applied hardware platform of the present invention is simple in structure, has good practicability.
Embodiment
Adopting the multispectral image analytical technology to improve the bank note distinguishing ability is that cash inspecting machine, currency counting and detecting machine, ATM automatic teller machine (following general designation cash inspecting machine) etc. need carry out a kind of development trend that forge or true or paper money is differentiated financial machine and tool.Comprise various countries' bank note of Renminbi, generally adopt the special ink printing technology, present different patterns under the different spectrum, therefore the multispectral image of bank note is analyzed, can realize the real and fake discrimination of higher reliability based on image analysis technology.
Adopt image analysis technology, not only can realize the real and fake discrimination of bank note, can also realize the identification of bank note hat font size simultaneously, and then support banking system to realize the scientific management of fiduciary circulation.
Adopt the various needs that can be applicable to of the technology of the present invention to carry out in the financial machine and tool of forge or true or paper money discriminating, system architecture is seen Fig. 1, wherein possible built-in one or two contact-type image sensors (hereinafter to be referred as CIS), and assembled hardware circuit board.High-performance processor on the circuit board can receive and analyze magnetic signal, the photoelectric tube signal of cash inspecting machine, gathers an image of bank note or gathers the double-edged image of bank note simultaneously by CIS.Based on high-performance processor, this cash inspecting machine can be realized functions such as real-time image collection, Flame Image Process, Currency Type identification, the identification of bank note direction, truth identification, the identification of hat font size.
As shown in Figure 5 and Figure 6, the circuit of multispectral money press comprises power circuit, CIS interface circuit and DSP (digital signal processor) signal processing circuit.Power circuit all links to each other with the DSP signal processing circuit with the CIS interface circuit, and the CIS interface circuit is connected to the DSP signal processing circuit, and the CIS interface circuit is supported triple channel CIS sensor.The CIS interface circuit comprises CIS interface connector, mould/number conversion controller and CPLD (CPLD) device and the image buffer storage that links to each other successively.
Mould/number conversion controller can comprise three the tunnel and the chip AD9822 that connects.The CPLD module can adopt the EMP1270 chip, and it is circumscribed with two SRAM (static random-access memory) chip.It is the dsp processor of TMS320DM6437 that the DSP signal processing circuit can adopt model, and it is circumscribed with two DDR SDRAM (double data rate synchronous DRAM) storage chip and a FLASH (flash memory) storage chip.Based on the integrated UART in dsp processor inside (universal asynchronous receiving-transmitting transmitter) controller, use outside RS-232 driver, realize the external serial line interface of RS-232.The CIS sensor can adopt three-channel line array CCD (charge coupled cell) sensor.
Power circuit is accepted the input of 12V direct supply, is divided into four the tunnel then, is connected to DC-DC (DC-to-dc) voltage stabilizer TPS62111, TPS62110, a TPS62112 and the 2nd TPS62112 respectively; The 3.3V DC voltage of TPS62111 output is divided into two-way, and one the tunnel for total system provides the direct current supply of 3.3V, and another road is connected to DDR SDRAM storer by the DC voltage that TPS73018 provides 1.8V; TPS62110 provides the DC voltage of 1.2V, is connected to dsp processor; The one TPS62112 provides the DC voltage of 5V, is connected to mould/number conversion controller; The 2nd TPS62112 is divided into two-way, and one the tunnel provides the DC voltage of 5V, is the light source power supply of outside CIS sensor, and another road is the internal logic circuit power supply of outside CIS sensor by the direct supply that TPS73033 provides 3.3V.
The present invention relates to the multinomial technical method of each link in the multispectral cash inspecting machine.In application, these methods can be used simultaneously, also can partly use.
The present invention solves following problem:
According to the position of magnetic material on bank note carry out bank note towards quick differentiation.
2. according to the spectrum of bank note, so that be preced with font size identification and real and fake discrimination simultaneously towards automatic switchover CIS light source.
3. design a kind of new forge or true or paper money discrimination method in conjunction with traditional magnetic detection anti-counterfeiting technology and image analysis technology.
4. method that strengthens banknote image and background image contrast.
5. in the CIS interface circuit, realize the bank note rim detection, thereby reduce the load of processor, improve the method for the processing speed of entire system.
6. increase artificial bank note identification function for cash inspecting machine.
As shown in Figure 2, multispectral forge or true or paper money identification system generally includes following link: image acquisition, image pre-service, real and fake discrimination, the identification of hat font size, output as a result etc., this patent relates to wherein multinomial technology.
A bank note towards method of discrimination.
In bank note false distinguishing facility, all be provided with photoelectric tube and magnetic head, can detect the edge, front and the back edge of bank note by photoelectric tube; Magnetic head then can detect whether contain magnetisable material on the bank note, all has magnetic as hat font size and metal anti-counterfeiting line in the Renminbi.
Native system at first passes through the edge, front and back of photoelectric tube input bank note, detect magnetic material with magnetic head then, and according to the position of magnetic material on bank note (on the left side of bank note still on the right, near front and back along still near back edge) judge bank note towards.
As shown in Figure 3,, detect the position of magnetic material by magnetic head for 100 yuans in the 5th cover: if hat font size and metal wire on the left side, and bank note the hat font size is near the edge, front during paper feed in cash inspecting machine, bank note be the positive dirction (Fig. 3 A) in front; If hat font size and metal wire are on the right, and bank note the hat font size is near back edge during paper feed in cash inspecting machine, bank note be the opposite direction (Fig. 3 B) in front; If hat font size and metal wire are on the right, and bank note the hat font size is near the edge, front during paper feed in cash inspecting machine, bank note is the positive dirction (Fig. 3 C) of reverse side; If hat font size and metal wire on the left side, and bank note the hat font size is near back edge during paper feed in cash inspecting machine, then bank note is the opposite direction (Fig. 3 D) of reverse side.
2. the hardware controls buttress, is discerned and real and fake discrimination so that be preced with font size simultaneously towards automatically the light source of CIS pipe being switched on a certain spectrum according to bank note.
Every bank note of hardware circuit version real-time judge towards, and according to towards the spectrum that switches CIS pipe light source.When two CIS pipes are arranged in the bank note false distinguishing facility, all or part of use visible light of one side of hat font size is arranged, as green glow, blue light, white light etc., it is high-visible in banknote image to guarantee to be preced with font size.And the another side of bank note toggle lights as required, as switch to infrared or ultraviolet light so that the corresponding spectrum picture of hardware collection carries out real and fake discrimination; When having only a CIS pipe in the cash inspecting machine, when gathering the image of hat font size region, the spectrum of CIS light source switches to visible light, and as green glow, blue light, white light etc., it is high-visible in banknote image to guarantee to be preced with font size.Other zone is toggle lights as required then, as switch to infrared or ultraviolet light so that the corresponding spectrum picture of hardware collection carries out real and fake discrimination.
3. detect a kind of new type paper currency distinguishing method between true and false of anti-counterfeiting technology and image analysis technology in conjunction with traditional magnetic.
Bank note uses special magnetic material design anti-counterfeiting characteristic usually, as being magnetic on hat font size and the false proof metal wire in the Renminbi.In the tradition bank note fake identifying machine tool, whether have magnetic by detection bank note privileged site and realize real and fake discrimination.Some counterfeit moneys add magnetic material by the whole bag of tricks is artificial on counterfeit money, detect thereby hide this true and false.
In the native system, this classic method and image analysis technology are combined, at first adopt said method " 1 ", according to the location recognition bank note of magnetic material on bank note towards, again the method by graphical analysis to bank note towards discerning, if the direction determining that two kinds of methods obtain is inconsistent, this bank note of decidable is counterfeit money.
This be because: in counterfeit money, the true and false that the artificial magnetic material that adds is primarily aimed at magnetic head detects, because the position of its distribution is usually different with genuine note, may not have magnetic in this magnetic place, and should not be magnetic on the contrary in magnetic place, magnetic perhaps grows on trees.In this case, according to the position judgment direction of magnetic material tend to graphical analysis obtain towards not being inconsistent.Around this principle can detect the part counterfeit money.
4. by strengthening the contrast of banknote image and background image, improve the new method of bank note rim detection speed and accuracy.In the CIS image that collects, banknote image is superimposed upon on the more uniform background image.As shown in Figure 4, in order to strengthen the contrast of the two, CIS pipe opposite is processed into dark color, as black, Dark grey etc.Background color very dark (gray-scale value that is background pixel is very little) in the CIS image that collects has like this been strengthened the contrast of banknote image and background, helps improving bank note rim detection speed and accuracy.
5. in the CIS interface circuit, realize the bank note rim detection, thereby reduce the load of processor, improve the processing speed of entire system.
In cash inspecting machine with multispectral image analysis, on hardware circuit board, designed special CIS interface circuit, normal CPLD of employing or FPGA (field programmable gate array) chip are realized the interface control of CIS, and with the image data transmission of gathering in the processor of hardware handles plate.
System must determine the edge of bank note earlier when doing graphical analysis.The present invention is in the interface circuit of CIS, it specifically is the rim detection that in CPLD or FPGA, realizes bank note, thereby the data that reduce between interface circuit and the DSP transmit, and significantly reduce the needed calculated amount in DSP analysis bank note edge, improve the processing speed of cash inspecting machine entire system.Especially after having adopted said method " 3 " to strengthen the contrast of banknote image and background image, can whether surpass the detection that certain thresholding is realized the bank note edge according to pixel value, the calculated amount of bank note rim detection reduces greatly, is easier to realize in CPLD/FPGA this function.
6. increase the video output of cash inspecting machine, be convenient to the multispectral image that human eye is analyzed bank note, realize artificial real and fake discrimination.
DSP can obtain complete bank note multispectral image by CIS, and graphical analysis is finished automatically by DSP generally speaking, does not need manual intervention.But at some in particular cases, if can allow infrared image, the ultraviolet image of professional's eye-observation bank note, or other spectrum picture, can screen the doubtful counterfeit money of Gao Fang more accurately.
Native system has designed video output interface, the multispectral image of exportable bank note.The demonstration banknote image can be used common televisor, computer monitor etc., also image can be presented on the integrated display of cash inspecting machine (as LCD).
Below to use the embodiment that each method is described as example simultaneously.
When bank note enters cash inspecting machine, advance paper money and detect the edge, front that photoelectric tube detects bank note, magnetic head is then monitored the material that whether is magnetic on the bank note, according to the position of magnetisable material on bank note, make bank note towards differentiation.Below with the 5th cover Renminbi 100 yuan notes be the example explanation towards deterministic process.
For the 5th cover Renminbi 100 yuan notes, at first, judge hat font size or metal wire Left or right at bank note by detecting magnetic; Write down simultaneously from the bank note front along to being preced with the interval time of font size between occurring, according to this time interval and cash inspecting machine walk paper money speed, can judge the hat font size near the front of bank note along or back edge.According to the hat font size/metal wire on a left side/right side of bank note, and the hat font size at the front of bank note edge/back edge, can judge bank note towards.As shown in Figure 3.
If cash inspecting machine need carry out real and fake discrimination and the identification of hat font size simultaneously, detect bank note towards after, cash inspecting machine according to bank note towards, the spectrum of automatic switchover CIS light source, make that hat font size zone is visible light (white light, green glow, blue light an etc.) image in the banknote image, the hat font size of bank note is clear and legible.And the needs that other zone is differentiated according to forge or true or paper money switch the spectrum of CIS light source, as infrared spectrum, ultraviolet spectrum etc.
After the hardware handles plate obtains complete banknote image, method by graphical analysis is judged towards carrying out secondary bank note, and with result of determination and front according to the magnetic material distributing position judge towards comparing, if the two does not conform to, judge that then this bank note is counterfeit money., think image that graphical analysis judges towards being accurately here, if with according to the magnetic material location determination towards not being inconsistent, the magnetic that the bank note be described confusion that distributes has the feature of counterfeit money.
Before bank note is carried out graphical analysis, must provide the profile of bank note exactly with the method for image segmentation.In image, bank note is prospect, and other zone is a background.Background and prospect contrast are big more, cut apart simple more, accurate more.And simple partitioning algorithm calculated amount is also littler, helps the high-speed real-time processing that cash inspecting machine is realized bank note.Among the present invention, CIS is managed the opposite be treated to dark color/black, the light that can strong absorption CIS sends, thereby the background area is very dark, promptly pixel value is very little; Comparatively speaking, the light that bank note region reflection CIS sends in the image, thereby brighter, promptly pixel value is bigger.Background and prospect contrast are very big, just can set a threshold value simply, when image pixel value during less than this thresholding, are judged to be background, when greater than this thresholding, are judged to be prospect, i.e. bank note.
As mentioned above, bank note is carried out must providing exactly with the method for image segmentation before the graphical analysis profile of bank note, the image segmentation algorithm processor on the hardware plate is usually finished, according to the algorithm difference, more or less increased computation burden, and then influenced the speed that cash inspecting machine is handled bank note to processor.
On the hardware circuit board of cash inspecting machine, designed special CIS interface circuit, wherein the part of core is the CPLD/FPGA chip, this chip is realized the interface logic of CIS, and the CIS pixel information is organized into image, sends the processor on the hardware plate to.The present invention realizes the image segmentation processing in the CPLD/FPGA of CIS interface circuit chip.Do the benefit of two aspects like this: at first, can reduce the data transmission between CPLD/FPGA and the primary processor, promptly only transmit view data effectively, invalid background data does not transmit or few transmission; In addition, with regard to the edge of known bank note, do not need to do image segmentation when primary processor is received the CIS image, or only need carry out precision to the segmentation result of front and handle, calculated amount greatly reduces, and helps improving the bill handling speed of cash inspecting machine.Special after having adopted the CIS display foreground/background reflectance Enhancement Method among the present invention, can whether surpass the detection that certain thresholding is realized the bank note edge according to pixel value, the calculated amount of bank note rim detection reduces greatly, is easier to realize in CPLD/FPGA this function.
In multispectral cash inspecting machine, graphical analysis is finished automatically by primary processor generally speaking, does not need manual intervention.But at some in particular cases, if can allow infrared image, the ultraviolet image of professional's eye-observation bank note, or other spectrum picture, can screen the doubtful counterfeit money of Gao Fang more accurately.The present invention is a cash inspecting machine designed image output interface, the multispectral image of exportable bank note.The demonstration banknote image can be used common televisor, computer monitor etc., also image can be presented on the integrated display of cash inspecting machine (as LCD).
The interface of output banknote image can have various forms.For example:, adopting S-video (light tone separation terminal) or CVBS (composite video broadcast singal) video interface if banknote image outputs on the external television; If the employing computer monitor can adopt VGA (Video Graphics Array) interface of standard; If image shows on the integrated LCD of cash inspecting machine, the various standards or the non-standard interface that then can adopt liquid crystal panel itself to support.
Image can have variety of way when showing, sets flexibly according to product needed.For example, can show the image of each bank note in real time, when not having next bank note, show the image of last bank note on the screen still, if when detecting counterfeit money during emergency brake, what show on the screen is the image of this counterfeit money.In the another kind of mode, can only show detected counterfeit money image, other banknote image does not show that this mode can alleviate the load of primary processor.