A kind of contact positioning method and use this localization method to pipe touch-screen
[
technical field]
The present invention relates to infrared technique field, particularly a kind of contact positioning method and use this localization method to pipe touch-screen.
[
background technology]
The principle of work of infrared touch panel is covered with infrared receiving tube and infrared transmitting tube (as shown in Figure 1) in the surrounding of touch-screen, these infrared tubes in touch screen surface in Rankine-Hugoniot relations one to one, form a light net become by infrared ray cloth, when have object (finger, band gloves or any touching object) enter infrared light net stop the infrared ray transmitter and receiver in somewhere time, the ultrared power that this receiving tube putting both direction anyhow receives will change, by the change understanding ultrared reception condition, equipment just can know that where touches.Due to the principle of work of infrared touch panel itself, can accomplish during use to touch work without pressure (referring to touch body to the applied pressure of touch-screen own), therefore touch-screen can be accomplished without glass work.Infrared touch panel, by hardware design and software programming, can carry out interpolation calculation to each point data, can reach the resolution of 4096*4096.In a flash same when infrared touch panel works, a pair infrared tube (referring to that the corresponding power valve and of physical location receives only pipe) is only had to carry out datamation, circuit is by reaching the effect of reaction rapidly to the high-frequency data acquisition of infrared tube, therefore the reaction velocity of touch-screen quickly.
Traditional locator meams as shown in Figure 2.The below of infrared touch panel and right are for launching fluorescent tube, and left and top are for receiving fluorescent tube.During touch-screen work, transmitting and receiving are one to one.That is: 1 signal lamp of X-axis is launched, and 1 signal lamp of the reception that top X-axis is corresponding receives.2 signal lamps are launched, and top 2 signal lamp receives, and scans last lamp of X-axis so successively.Then No. 1, Y-axis transmitting, corresponding No. 1, Y-axis reception, the transmitting of No. 2, Y-axis, corresponding No. 2, Y-axis reception, scans last lamp of Y-axis always.After receiving light receives the luminous signal of emission lamp, reception diode can produce faint change in voltage.The voltage signal that MCU can detect is enlarged into through amplifying circuit.The power of the power of voltage and the light of reception is roughly linear.As shown in Figure 2, can block the light of corresponding fluorescent tube when there being contact to press, namely 20 lamps of X-axis, AD sampled value that 21 lamps are corresponding are 0, and the AD sampled value that 10 lamps of Y-axis, 11 lamps are corresponding is 0.And for 19 lamps of X-axis, its correspondence has blocked 21%, then the X right margin of this point is 21 × 100=2100, and its left margin is 19 × 100-21=1879, and its coordinate is: the value after (left margin+right margin)/2=1989.5=1990(rounds up).And for 12 lamps of Y-axis, its correspondence has blocked 34%, then the Y coboundary of this point is 11 × 100+34=1134, and its lower boundary is 9 × 100=900, and its coordinate is: (coboundary+lower boundary)/2=1017, then the coordinate of this point final has been (1990,1017).But adopt this kind of touch screen structure and localization method to make transmitting/receiving fluorescent tube more, closely, add the cost of product.Based on this, some designer decreases the quantity of transmitting/receiving fluorescent tube, but but make the boundary position of some situation can not determine, and then cause the inaccurate and setting-out in location unsmooth, and such as Y-axis situation in figs. 2 and 3, its coboundary and lower boundary be not in the belt-like zone of infrared lamp scanning, its border can only be accurate to the right boundary of 11 lamps, comparatively large apart from its actual position gap, if moving process can cause the sawtooth occurring 5mm, poor effect.Therefore, how when reducing transmitting/receiving fluorescent tube quantity, guarantee that accurate positioning and setting-out are smoothly one of emphasis of studying of those skilled in the art.
[
summary of the invention]
In order to overcome prior art when reduce transmitting/receiving fluorescent tube quantity, produce location inaccurate, the rough technical matters of setting-out, the invention provides a kind of contact positioning method and use this localization method to pipe touch-screen.
The present invention solves the problems of the technologies described above adopted technical scheme:
There is provided a kind of contact positioning method, the method comprises the following steps:
S1, infrared emission fluorescent tube and infrared receiver fluorescent tube that X-axis has N number of correspondence are set, and Y-axis are set there is M corresponding infrared emission fluorescent tube and infrared receiver fluorescent tube respectively;
S2, the gap of any point respectively the infrared emission fluorescent tube of X-axis and Y-axis and infrared receiver fluorescent tube being set up to this region in the mode tiltedly scanned compensate look-up table;
S3, respectively in the mode directly scanned, the general location determining contact is gone to the infrared emission fluorescent tube of X-axis and Y-axis and infrared receiver fluorescent tube, compensate look-up table according to the general location of this contact by the gap of searching in above-mentioned steps S2, determine the particular location of this contact in the mode tiltedly scanned.
Further, N and M in described step S1 is the integer being greater than 1.
Further, the gap setting up any point in this region in the mode tiltedly scanned in described step S2 compensates the concrete steps of look-up table and is:
With the n-th infrared emission fluorescent tube in X-axis and (n-1)th in corresponding X-axis, n-th-2 ... and the 1st infrared receiver fluorescent tube tiltedly scans, and with m infrared emission fluorescent tube in Y-axis and m-1 corresponding in corresponding Y-axis, m-2 ... and the 1st infrared receiver fluorescent tube tiltedly scans, finally set up the gap that X-axis and Y-axis tiltedly scan and compensate look-up table (wherein n=N, m=M).
Further, in described step S3, the concrete steps of the particular location of fixed contact are really:
First, according to the general location of the contact of correspondence, determine the left margin N1 of this contact in X-axis and right margin N2, and the coboundary M1 of this contact in Y-axis and lower boundary M2;
Then, look-up table is compensated by gap:
Tiltedly scan with N3 infrared receiver fluorescent tube in corresponding X-axis with N1 infrared emission fluorescent tube in X-axis, and the gap of blocking determining this contact is X1%, then the particular location of the left margin of this contact is N1*100+X1, tiltedly scan with N4 infrared receiver fluorescent tube in corresponding X-axis with N2 infrared emission fluorescent tube in X-axis, then the particular location of the right margin of this contact is N2*100-X1 again;
Oblique seedling is carried out with M3 infrared receiver fluorescent tube in corresponding Y-axis with M1 infrared emission fluorescent tube in Y-axis, and the gap of blocking determining this contact is Y1%, then the particular location of the coboundary of this contact is M1*100+Y1, tiltedly scan with M4 infrared receiver fluorescent tube in corresponding Y-axis with M2 infrared emission fluorescent tube in Y-axis, then the particular location of the right margin of this contact is M2*100-Y1 again;
Finally, determine that the coordinate of the particular location of this contact is for ((left margin+right margin)/2, (coboundary+lower boundary)/2);
Wherein, N1, N2, N3 and N4 are the integer being not more than N, and N1 ≠ N3, N2 ≠ N4; M1, M2, M3 and M4 are the integer being not more than M, and M1 ≠ M3, M2 ≠ M4.
Further, described N and M is between corresponding infrared emission fluorescent tube and infrared receiver fluorescent tube evenly or uneven distribution.
The present invention solves the problems of the technologies described above another adopted technical scheme:
There is provided a kind of use above-mentioned contact positioning method to pipe touch-screen, it comprises:
To pipe touch screen body, it has infrared emission fluorescent tube and the infrared receiver fluorescent tube of N number of correspondence in X-axis, has infrared emission fluorescent tube and the infrared receiver fluorescent tube (wherein N, M are the integer being greater than 1) of M correspondence in Y-axis respectively;
The gap be connected with pipe touch screen body compensates look-up table and sets up module, and the gap for any point infrared emission fluorescent tube of X-axis and Y-axis and infrared receiver fluorescent tube being set up this region in the mode tiltedly scanned compensates look-up table;
The contact position determination module be connected with pipe touch screen body, for the infrared emission fluorescent tube of X-axis and Y-axis and infrared receiver fluorescent tube are gone in the mode directly scanned the general location determining contact, and compensate look-up table according to the general location of this contact and by the gap of searching in above-mentioned steps S2, the particular location of this contact is determined in the mode tiltedly scanned.
Further, described N and M is 32, and is positioned at infrared emission fluorescent tube corresponding in described X-axis 32 and infrared receiver fluorescent tube, and is positioned at infrared emission fluorescent tube corresponding in described Y-axis 32 and infrared receiver fluorescent tube for evenly or uneven distribution.
Further, described in be positioned in described X-axis 32 corresponding infrared emission fluorescent tube, infrared receiver fluorescent tube, and be positioned at infrared emission fluorescent tube corresponding in described Y-axis 32, infrared receiver fluorescent tube for being uniformly distributed, and the distance between each lamp is 12mm.
Further, the infrared emission fluorescent tube that described 32 of being positioned in described X-axis are corresponding and infrared receiver fluorescent tube, and be positioned at infrared emission fluorescent tube corresponding in described Y-axis 32 and infrared receiver fluorescent tube is uneven distribution, and be positioned at 8 infrared emission fluorescent tubes and the infrared receiver fluorescent tube of described X-axis left end, and the spacing of 8 the infrared emission fluorescent tubes and infrared receiver fluorescent tube that are positioned at described Y-axis upper end is 5.1mm, the distance between other lamps is 10mm.
Further, the infrared emission fluorescent tube that described 32 of being positioned in described X-axis are corresponding and infrared receiver fluorescent tube, and be positioned at infrared emission fluorescent tube corresponding in described Y-axis 32 and infrared receiver fluorescent tube is uneven distribution, and be positioned at 8 infrared emission fluorescent tubes and the infrared receiver fluorescent tube of described X-axis right-hand member, and the spacing of 8 the infrared emission fluorescent tubes and infrared receiver fluorescent tube that are positioned at described Y-axis lower end is 5.1mm, the distance between other lamps is 10mm.
Relative to existing technology, beneficial effect of the present invention is: first this contact positioning method compensates look-up table by setting up a gap on the basis of only scanning in the past, then the particular location of contact is determined by the mode of tabling look-up and tiltedly scan, the present invention can when reducing transmitting/receiving fluorescent tube quantity, level and smooth with the accurate positioning and setting-out of guaranteeing contact, greatly reduce the cost of touch-screen.
[accompanying drawing explanation]
Fig. 1. be the structural drawing of infrared touch panel of the prior art;
Fig. 2. be location, the contact schematic diagram of infrared touch panel of the prior art;
Fig. 3. for fluorescent tube quantity in infrared touch panel of the prior art reduces location, the contact schematic diagram after half;
Fig. 4. be the process flow diagram of contact positioning method of the present invention;
Fig. 5. be location, the contact schematic diagram of infrared touch panel of the present invention;
Fig. 6. be the location schematic diagram setting up compensation look-up table in gap at longitudinal region of infrared touch panel of the present invention;
Fig. 7. the contact for the infrared touch panel in embodiments of the invention is positioned at left margin location schematic diagram during centre position;
Fig. 8. the contact for the infrared touch panel in embodiments of the invention is positioned at location, coboundary schematic diagram during centre position;
Fig. 9. the contact for the infrared touch panel in embodiments of the invention is positioned at left margin location schematic diagram during boundary position;
Figure 10. for of the present invention to the frame diagram of pipe touch-screen;
Figure 11. be one of structural drawing to pipe screen body of touch screen of the present invention;
Figure 12. for of the present invention to the structural drawing two of pipe screen body of touch screen;
Figure 13. for of the present invention to the structural drawing three of pipe screen body of touch screen.
[embodiment]
Below in conjunction with drawings and embodiments, the invention will be further described.
The object of design of the present invention is: can guarantee the cost reducing touch-screen greatly on the one hand, namely the infrared emission fluorescent tube in reduction touch-screen and the quantity of infrared receiver fluorescent tube, can improve positional accuracy and the setting-out smoothness of contact on the other hand on this basis by the scanning algorithm improving infrared emission fluorescent tube and infrared receiver fluorescent tube.
On this basis, refer to shown in Fig. 4, a kind of contact positioning method provided by the present invention, the method comprises the following steps:
S1, infrared emission fluorescent tube and infrared receiver fluorescent tube that X-axis has N number of correspondence are set, and Y-axis is set there is M corresponding infrared emission fluorescent tube and infrared receiver fluorescent tube (wherein N, M are the integer being greater than 1) respectively, and the N number of lamp in this X-axis and M lamp in Y-axis can evenly or uneven distribution;
S2, the gap of any point respectively the infrared emission fluorescent tube of X-axis and Y-axis and infrared receiver fluorescent tube being set up to this region in the mode tiltedly scanned compensate look-up table;
S3, respectively in the mode directly scanned, the general location determining contact is gone to the infrared emission fluorescent tube of X-axis and Y-axis and infrared receiver fluorescent tube, compensate look-up table according to the general location of this contact by the gap of searching in above-mentioned steps S2, determine the particular location of this contact in the mode tiltedly scanned.
Such as: the gap set up in the present embodiment compensates look-up table can be as follows:
Near a border 0-2/13 screen, 8 lamps tiltedly scan, contact is blocked completely border light to contact outer edge, the oblique scanning of 8 lamps of being separated by;
Near a border 2/13-3/16 screen, 3 lamps tiltedly scan, contact is blocked completely border light to contact outer edge, the oblique scanning of 3 lamps of being separated by;
Near a border 3/16-5/16 screen, 2 lamps tiltedly scan, contact is blocked completely border light to contact outer edge, the oblique scanning of 2 lamps of being separated by;
Near a border 5/16-11/16 screen, 1 lamp tiltedly scans, contact is blocked completely border light to contact outer edge, the oblique scanning of 1 lamp of being separated by.
Wherein, the gap setting up any point in this region in the mode tiltedly scanned in step S2 compensates the concrete steps of look-up table and is: with the n-th infrared emission fluorescent tube in X-axis and (n-1)th in corresponding X-axis, n-th-2 ... and the 1st infrared receiver fluorescent tube tiltedly scans, and with m infrared emission fluorescent tube in Y-axis and m-1 corresponding in corresponding Y-axis, m-2 ... and the 1st infrared receiver fluorescent tube tiltedly scans, finally set up the gap that X-axis and Y-axis tiltedly scan and compensate look-up table (wherein n=N, m=M).And in step s3 really the concrete steps of the particular location of fixed contact be: first, according to the general location of the contact of correspondence, determine the left margin N1 of this contact in X-axis and right margin N2, and the coboundary M1 of this contact in Y-axis and lower boundary M2; Then, look-up table is compensated: tiltedly scan with N3 infrared receiver fluorescent tube in corresponding X-axis with N1 infrared emission fluorescent tube in X-axis by gap, and the gap of blocking determining this contact is X1%, then the particular location of the left margin of this contact is N1*100+X1, tiltedly scan with N4 infrared receiver fluorescent tube in corresponding X-axis with N2 infrared emission fluorescent tube in X-axis, then the particular location of the right margin of this contact is N2*100-X1 again; Oblique seedling is carried out with M3 infrared receiver fluorescent tube in corresponding Y-axis with M1 infrared emission fluorescent tube in Y-axis, and the gap of blocking determining this contact is Y1%, then the particular location of the coboundary of this contact is M1*100+Y1, tiltedly scan with M4 infrared receiver fluorescent tube in corresponding Y-axis with M2 infrared emission fluorescent tube in Y-axis, then the particular location of the right margin of this contact is M2*100-Y1 again; Finally, determine that the coordinate of the particular location of this contact is for ((left margin+right margin)/2, (coboundary+lower boundary)/2); Wherein, N1, N2, N3 and N4 are the integer being not more than N, and N1 ≠ N3, N2 ≠ N4; M1, M2, M3 and M4 are the integer being not more than M, and M1 ≠ M3, M2 ≠ M4.
Be described by a specific embodiment below, as shown in Figure 5, when every a lamp, by adopting suitable oblique scanning (Y-axis in figure, the oblique scanning of the 11st infrared emission fluorescent tube and the 10th infrared receiver fluorescent tube, the oblique scanning of the 11st infrared emission fluorescent tube and the 12nd infrared receiver fluorescent tube), can find being in the touch objects border of directly sweeping gap place.Thus the left and right border of accurate contact and upper and lower border.
And as shown in Figure 6, also by the oblique scanning of several mode, the gap of 15-17 signal lamp all can be covered, and often kind of longitudinal region tiltedly scanning covering is different, so namely, by the mode of multiple oblique scanning, the longitudinal region in whole gap is all covered.The longitudinal region of this multiple oblique scanning and its covering is made a gap and compensates look-up table.Same transverse area also can be adopted and use the same method.And when concrete contact positioning work, first determine the approximate location of contact at touch-screen by scanning pipe correlation of lamp.Then for the gap on its border, according to its contact approximate location, table look-up and select correspondence tiltedly to sweep into line scanning, and carry out the accurate of contact by the result of tiltedly sweeping.
Consult in the enforcement illustration of Fig. 7, wherein dark circles represents a contact.Its left margin is positioned in the middle of 6 signal lamps and 7 signal lamps, and by 6-6, can not obtain its border accurately with the scanning of 7-7.And the central authorities of touch-screen are roughly positioned at by the Y-direction that the straight scanning of Y-axis determines this contact.So namely, compensating the adjacent oblique scanning of look-up table selection by searching gap, adopting the oblique scanning of 6-7, the gap of middle straight scanning can be completed and cover completely.And as shown in Figure 7, it is 54% that gap is blocked in this contact, then the position calculation of its left margin is 11 × 100+(100-54)=1146.
Consult in the enforcement illustration of Fig. 8, same dark circles represents a contact.Its coboundary is positioned in the middle of 6 signal lamps and 7 signal lamps.By 6-6, its border accurately can not be obtained with the scanning of 7-7.The X-direction that the straight scanning of X-axis determines this contact is roughly positioned at the central authorities of touch-screen.Compensating the adjacent oblique scanning of look-up table selection by searching gap, adopting the oblique scanning of 6-7, the gap that middle straight is swept can be completed and cover completely.And as shown in Figure 8, it is 48% that gap is blocked in this contact, then the position calculation of its coboundary is 11 × 100+48=1148.Equally, the particular location of the right margin of this contact and lower boundary can with reference to the localization method of left margin and coboundary.
And the above position being all contact needs are located is positioned at the situation of touch-screen zone line.Namely introducing contact is below near method for calculating and locating on one side.When contact is positioned at boundary position, as shown in Figure 9: first determine that contact is positioned near 2 signal lamps in X-axis by straight scanning, be positioned near 6 signal lamps in Y-axis.And this 2 signal lamp compensates look-up table by searching gap, being judged as quite near screen left margin position, adopting the oblique scanning of large-angle inclined scanning 7-2 just to cover straight scanning slit above contact.Contact covers this gap 70%, then tiltedly scanning with 7-2 the AD value obtained can be original 30%.Calculating its coboundary is 11 × 100+70=1170.
And the citing of above to be spacing between lamp the be 5mm contact boundary alignment demonstrated.Be left margin and coboundary respectively, and the process of right margin and lower boundary is same reason.Namely no longer repeat herein.
Consult shown in Figure 10, the present invention adopt above-mentioned contact positioning method to pipe touch-screen, it comprises: to pipe touch screen body, it has infrared emission fluorescent tube and the infrared receiver fluorescent tube of N number of correspondence in X-axis, has infrared emission fluorescent tube and the infrared receiver fluorescent tube (wherein N, M are the integer being greater than 1) of M correspondence in Y-axis respectively; The gap be connected with pipe touch screen body compensates look-up table and sets up module, and the gap for any point infrared emission fluorescent tube of X-axis and Y-axis and infrared receiver fluorescent tube being set up this region in the mode tiltedly scanned compensates look-up table; The contact position determination module be connected with pipe touch screen body, for the infrared emission fluorescent tube of X-axis and Y-axis and infrared receiver fluorescent tube are gone in the mode directly scanned the general location determining contact, and compensate look-up table according to the general location of this contact and by the gap of searching in above-mentioned steps S2, the particular location of this contact is determined in the mode tiltedly scanned.
Concrete, N and M is 32, and is positioned at infrared emission fluorescent tube corresponding in X-axis 32 and infrared receiver fluorescent tube, and is positioned at infrared emission fluorescent tube corresponding in Y-axis 32 and infrared receiver fluorescent tube for evenly or uneven distribution.
Consult shown in Figure 11, be positioned at infrared emission fluorescent tube, infrared receiver fluorescent tube that in X-axis 32 are corresponding, and be positioned at infrared emission fluorescent tube corresponding in Y-axis 32, infrared receiver fluorescent tube for being uniformly distributed, and the distance between each lamp is 12mm.
Consult shown in Figure 12 and Figure 13, be positioned at infrared emission fluorescent tube corresponding in X-axis 32 and infrared receiver fluorescent tube, and be positioned at infrared emission fluorescent tube corresponding in Y-axis 32 and infrared receiver fluorescent tube is uneven distribution; And be positioned at 8 infrared emission fluorescent tubes and the infrared receiver fluorescent tube of X-axis left end, and the spacing of 8 the infrared emission fluorescent tubes and infrared receiver fluorescent tube that are positioned at Y-axis upper end is 5.1mm, the distance between other lamps is that 10mm(is as Figure 12); Also can be set to 8 the infrared emission fluorescent tubes and the infrared receiver fluorescent tube that are positioned at X-axis right-hand member, and the spacing of 8 the infrared emission fluorescent tubes and infrared receiver fluorescent tube that are positioned at Y-axis lower end is 5.1mm, the distance between other lamps is that 10mm(is as Figure 13).
Foregoing detailed description is only exemplary description; those skilled in the art are not when departing from the scope and spirit that the present invention protects; can design various embodiment according to different actual needs, these embodiments all should be considered as belonging to protection scope of the present invention.