Infrared pick-up detection and localization touch-screen system
Technical field
The utility model belongs to technical field of computer multimedia, be specifically related to that a kind of robot calculator multimedia technology is used, based on the touch-screen system of infrared pick-up.
Background technology
Along with growing with each passing day of multimedia information inquiry, people use touch-screen more and more.Touch-screen is as a kind of up-to-date computer input equipment, is the simplest, convenient at present, naturally and be applicable to the input equipment of China's actual conditions again.That touch-screen has is sturdy and durable, reaction velocity fast, save the space, be easy to many advantages such as interchange.Utilize this technology, the user is as long as light finger is touched the icon that bumps on the computer display or literal just can be realized host service function, thereby makes man-machine interaction more simple and direct.
At present, touch-screen is distinguished according to know-why, can be divided into five basic kind: vector pressure sensing technology touch-screen, resistive technologies touch-screen, capacitance technology touch-screen, infrared technology touch-screen, surface acoustic wave technique touch-screen.Wherein vector pressure sensing technology touch-screen steps down from the stage of history.Traditional infrared technology touch-screen is made of infrared that is contained in screen outer-border and reception sensing element, on screen surface, forms the infra-red detection net, receives the realization touch screen operation thereby any touch object can stop the infrared ray on this aspect.Its main advantage be cheap, easy for installation, response speed is fast, but resolution is lower, damages easily.
Summary of the invention
The purpose of this utility model is to provide a kind of resolution height, non-damageable infrared ray detection and localization touch-screen system.
The technical scheme that the utility model adopted is, according to the retro-reflective properties of light, uses reflecting strips, and the light that infrared emission tube is sent is approximate to be returned by former road, and takes the infrared ray light intensity figure that returns by infrared camera.As touch, can weaken the infrared light intensity that the touch area is returned, contrast no touch and the image of touch is arranged is subtracted each other infrared image that is blocked that obtains and the infrared image that is not blocked, and obtains the coordinate that the position of light intensity change absolute value maximum can obtain being blocked.Infrared camera on such side angle can be determined a ray of crossing the touch point, and two cameras just can be according to determining the position of blocking through two rays of touch point are crossing simultaneously.
The infrared ray detection and localization touch-screen system that the utility model proposes is made up of image capture module 1, control circuit board 2, computing machine 6, as shown in Figure 1.Wherein, image capture module 1 by two infrared pick-up heads 3 that are contained in two jiaos of display screen screen frame homonymies respectively, be placed on the infrared transmitting tube 4 of infrared pick-up head 3 both sides, and enclose the reflecting strips 7 that is affixed on other three limits of screen frame and form.
The view data that control circuit board 2 collects infrared pick-up head 3 adopts the usb data form to send main frame 6 to, be responsible for data that to receive and the standard picture comparison that does not touch by user application, determine coordinate, return to operating system, thereby make up an infrared pick-up positioning touch screen system.
Control circuit board 2 is connected to form through circuit by USB control transmission chip 9, digital image sensor chip (CMOS) 10, formula logic chip (CPLO) 11 able to programme and static memory 12; Theory diagram as shown in Figure 8.Wherein, USB control transmission chip 9 is provided with parameters such as window to cmos digital image sensor chip 10 is provided with and is configured by revising register, Infrared is by optical lens and the imaging on cmos digital sensor chip 10 of infrared light color filter, digital image sensor chip 10 carries out spatial sampling to it, and exports 8 Digital Image Data Y[7:0 continuously according to certain frame frequency].In order to realize the coupling of digital image sensor chip output data and USB control transmission chip 9 device reading of data speed and sequential, used static memory (SRAM) 12 and programmable logic chip (CPLD) 11 to constitute high-speed buffer, the view data buffer memory that utilizes this high-speed buffer that digital image sensor 10 is gathered.Last USB control transmission chip 9 is realized communicating by letter with the USB interface of main frame, and the high-speed buffer data transmission is carried out subsequent image processing to PC.
Main frame module 6 mainly comprises firmware program, USB device driver and three parts of client application.
Firmware program code is stored among the RAM of USB control transmission chip 9 by loading, handle by reinforced 8051 single-chip microcomputers in the sheet, can adopt compilation or C language compilation, be mainly used to respond various USB device requests, finish various exchanges data work and event handling from system.The firmware program of acquisition system is developed based on the EZ-USB firmware program framework that CYPRESS company provides, and add the function code of finishing quick piece transmission, and the chained device descriptor gets final product.
The USB device driver provides the interface of application software and USB device for system, and main effect is to make operating system can discern USB device, and sets up the communication between host side and the equipment.The USB driver must be based on WDM (Windows Driver Model), adopt the architecture of layering, mainly be divided into 3 layers, high-rise USB device driver, middle layer USB kernel driver (USB Driver) and bottom USB master controller driver (USB HostController Driver)
Writing of user application adopts visual studio C++6.0 development environment, the function of system application mainly to be divided into man-machine interface initialization, firmware loading, view data processing, to proofread and correct test, data storage and read several sections.Wherein view data processing and correction test are the emphasis of native system.The task of image data procesisng program is the image comparison of the image that will read and standard no touch, sets up straight-line equation, calculates the work of touch point position.The correction test then is in original state or the collate program under the self check state after the mistake occurs, for image data procesisng program provides the image of the standard no touch under current operation environment and the lighting condition, and provide each data parameters of touch-screen, for debugging.
In the utility model, described infrared emission tube 4, infrared pick-up head 3, data line 5 and control circuit board 2 all are fixed in the housing of display screen.
The utility model adopts modular design, and extendability is strong, can realize the infrared pick-up touch screen functionality, and easy for installation, principle is simple, and cost is low, the resolution height.
Description of drawings
Fig. 1, system module are formed structure.
Fig. 2, reflex reflection schematic diagram.
The gray-scale statistical figure of Fig. 3, no touch image.Horizontal ordinate is the coordinate of screen X-axis, and ordinate is corresponding gray-scale value.Can see that the intensity profile on the image is more even.
Fig. 4, the gray-scale map that touches image is arranged.Horizontal ordinate is the coordinate of screen X-axis, and ordinate is corresponding gray-scale value.Can see that the gradation of image of tangible crest and no touch figure comparison is arranged on the image, can illustrate near this coordinate position has tangible light intensity variation.
Fig. 5, the figure of the difference that touches with the no touch image after taking absolute value arranged.Can be clear that more by error image, the appearance explanation light intensity generation strong variations of crest, with the finger touch position comparison that actual measurement is arrived, very approaching.
Fig. 6, be the control circuit board structured flowchart.
Fig. 7, user side function of application block diagram.
Fig. 8, data computation and display module program flow diagram.
Number in the figure: the 1st, image capture module, the 2nd, control circuit board, the 3rd, infrared pick-up head, the 4th, infrared emission tube, the 5th, usb data transmission line, the 6th, main frame, the 7th, reflecting strips, the α angle that to be the infrared pick-up head open with light source, i.e. view angle, the β angle that to be infrared emission tube open with the emission axon, i.e. incident angle, the 8th, emission axon, the 9th, the USB control chip, the 10th, cmos digital image sensor chip, the 11st, programmable logic chip, the 12nd, static memory.
Embodiment
The touch-screen system of the utility model design as shown in Figure 1.Form by image capture module 1, control circuit board 2 and computing machine 6, image capture module 1 is an image display panel, the display screen homonymy is provided with camera 3 respectively for two jiaos, and the both sides of each camera 3 are provided with infrared transmitting tube 4, and three limits in addition of display screen are provided with reflecting strips 7 respectively.
The light beam subtended angle of two infrared emission tubes 4 that is placed on infrared camera 3 both sides is between 40 °~60 °, and the Infrared that two infrared transmitting tubes 4 are sent can cover whole screen, shines the reflecting strips 7 at diagonal angle.
Infrared pick-up head 3 adopts 300,000-500,000 common pixel digital camera heads, the infrared ray color filter is housed on the camera, the effect of infrared ray color filter is to receive infrared light, leach most visible light, can make the light variation of operating environment that the influence of touch-screen is reduced to minimum like this, as long as the Infrared that infrared emission tube sends is stable, the no touch image of contrast usefulness just can once be determined in first installation system, can not take place because the situation that the no touch image that the variation of ambient light causes changes thereupon.Two camera 3 requirements of image capture module 1 can observe encloses the reflecting strips 7 that is affixed on screen three limits, and the camera visual angle wants big for this reason, thus need to adopt wide-angle lens, to increase angular field of view.
Reflecting strips 7 is to utilize optical principle, can get back to the light reflex reflection a kind of PVC bar at light source place.For weather resistance good film layer, constitute by little glass bead layer, focus layer, reflection horizon, adhesive-layer and peel ply successively.The reflex reflection schematic diagram is seen Fig. 2.The image that blocks that infrared camera 3 collects is seen Fig. 5.
Control circuit board 2 mainly comprise the inside of digital image sensor chip (CMOS) 10, Cypress company integrated USB control transmission chip (EZ-USB AN2131QC) 9, programmable logic chip (CPLD) 11 and the static memory (SRAM) 12 of 51 kernels of enhancement mode.Because the speed (27Mb/s) of digital image sensor output data and not matching of USB control chip (AN2131QC) 9 message transmission rates (12Mb/s), so system has adopted SRAM and CPLD to constitute middle high-speed buffer.
The infrared view that reflects through reflecting strips 7 former roads in the cmos digital image sensor chip 10 real time record image capture modules 1, this chip is integrated together CMOS photoinduction core and peripheral circuit, have control able to programme and mix functions such as output with video mould/number, the video format of output and CCIR operating such.The cmos digital image sensor chip sends view data to USB control transmission chip.USB control transmission chip is finished the function that the view data that the cmos image acquisition chip is collected is converted into the usb bus form of standard as the kernel control chip of system.The cmos image sensor chip is wanted output digital video stream, must could realize by the FPDP register in the sensor chip is carried out read-write operation, this will use programmable logic chip and produce address bus signal, chip selection signal, output enable signal, and cooperate above-mentioned these signals of clock enabling signal of cmos image acquisition chip effective, thereby read data ports register.System's reading images and the process of handling are:
(1) programmable logic chip 11 initialization, and the internal control register of cmos digital image sensor chip 10 is set, as exposure control, gain control, window size control etc.
(2) programmable logic chip 11 is provided with address signal, selects the video data port of digital image sensor chip 10.
(3) programmable logic chip 11 produces the chip selection signal of digital image sensor chip, notice image collection chip 10 beginning images acquired.
(4) programmable logic chip 11 produces chip selection signal, write signal, the address signal of static memory 12 according to the control signal of cmos digital image sensor chip 10 outputs, and the digital picture that collects like this can deposit in the storer in a continuous manner.
(5) programmable logic chip 11 sends signal to cmos digital image sensor chip 10, and notice stops images acquired, and notice USB control transmission chip 9 begins to prepare to read the data to data buffer zone in the static memory 12.
(6) USB control transmission chip 9 becomes the USB form to be input in the main frame data-switching that collects.Process flow diagram is seen Fig. 6.
When view data was sent to main frame through USB control transmission chip, the flow process that the user of main frame end uses master routine was as follows:
(1) the human-computer interaction Presentation Function is opened by user side application initialization system, and the basic parameter of system is set.
(2) USB is installed and drives, call out USB control transmission chip.
(3) acquisition chip of notice cmos digital imageing sensor begins to gather, the line data of going forward side by side conversion, output digital video signal.
(4) start to proofread and correct test procedure, by the user according to current indoor environment Adjustment System parameter, to obtain the not touch image under the current lighting condition.
(5) under normal mode, log-on data is calculated and display subroutine, and the touch location that calculating is returned sends computer system to, provides the reposition and the demonstration of mouse.Process flow diagram is seen Fig. 7.
It is exactly data computation and display subroutine that user side is used most crucial in the master routine, and its flow process is as follows:
(1) is written into a new two field picture.
(2) do not touch image subtraction with proofreading and correct test standard afterwards, and get its absolute value, show the gray-scale map of difference.
(3) threshold values that each pixel on the gray-scale map that obtains and correction test are obtained relatively if absolute difference, illustrates that the variation of two width of cloth images is not obvious less than threshold values, is considered to no touch, otherwise then thinks it may is that touch is arranged.It is the highest to be changed to gray scale greater than the gray values of pixel points of threshold values, is white prospect, and less than threshold values to be changed to gray scale minimum, be black background, gray level image is converted into the bianry image that has only two kinds of colors.
(4) not only comprise useful touch information in the bianry image that previous step obtains, also might comprise useless noise, can be according to the randomness of noise generation, uncontinuity, bianry image is carried out morphologic filtering again handle, corrosionization just is with noise remove.
Several situations of pointing of blocking might appear in the randomness that finger is put when (5) touching owing to the user on reflecting strips, can obvious not the rejecting in the prospect of normal range of white foreground area do not considered according to the empirical value of finger size.
(6) consider that the user may a more than finger touch, need to judge that the touch location of each and every one finger just need be with white prospect opsition dependent classification, usefulness be the cluster Kmeans algorithm of classics.
(7) to dividing good class compute classes center respectively, thereby obtain the touch location of each finger, and send these data to system, to provide mouse moving.Process flow diagram is seen Fig. 8.