A kind of infrared touch panel optical path signal adaptive regulation method and device
Technical field
The present invention relates to field of information processing, and in particular to a kind of infrared touch panel optical path signal adaptive regulation method and
Device.
Background technology
Infrared touch technical field is positioned by the infrared light path information analysis of stabilization and touches point coordinates.Infrared touch panel exists
During work, signal easily be subject to circuit itself, or external environment illumination factor influence, the stability of signal is touch-screen energy
No normal work it is basic.In the infrared touch panel course of work, the change of external environment, such as daytime, night can be run into not
With the influence of illumination or in certain moment intensity of illumination suddenly change, such as unexpected pulls open, closes curtain, have impact on infrared light
Road stability, the change of this external environment all brings disastrous effect to the signal acquisition of infrared touch panel.
In order to ensure signal stabilization, current technology is by component parameter, physics in circuit design or regulation circuit
The modes such as light shield reach the purpose of anti-light interference, but these technological means are still unable to the extraneous various most complex scenarios of customer service
Interference, and to hardware cost requirement it is higher.Generally included by way of processing of circuit at present using program interrupt or
Fixed contextual model triggering optical path signal regulation, real-time is poor;And physics light shield increases product cost, and light path is believed
Number energy also has the side effect of decay.
The content of the invention
In order to solve the above-mentioned technical problem, the present invention provide a kind of infrared touch panel optical path signal adaptive regulation method and
Device.
The present invention is realized with following technical scheme:
A kind of infrared touch panel optical path signal adaptive regulation method, including:
Obtain optical path signal a reference value Ebenchmark, normal noise change threshold Tnoise, touch change threshold TtouchWith it is different
Normal change threshold Tabnormal;
Obtain optical path signal and obtain the energy value E of current optical path signalcur;
Obtain optical path signal a reference value EbenchmarkWith the energy value E of current optical path signalcurDifference Ediff=
Ebenchmark-Ecur;
Judged to produce the energy value E of current optical path signal according to the differencecurThe reason for, the reason includes normally making an uproar
Sound, normal touch and abnormal conditions.
Further, also include:
According to the difference real-time update optical path signal a reference value Ebenchmark。
Further, the optical path signal a reference value Ebenchmark, noise change threshold Tnoise, touch change threshold Ttouch
With ANOMALOUS VARIATIONS threshold value TabnormalCan be set according to actual conditions.
Further, if Tnoise<|Ediff|<Ttouch, then judge normal noise occur and touched without producing;And more
New optical path signal a reference value Ebenchmark, the E after renewalbenchmarkIt is former EbenchmarkWith regulation parameter EadaptSum, the regulation
Parameter is Eadapt=Ediff*Irate。
Further, if | Ediff|≤Tnoise, then judge normal noise occur and touched without producing;And need not
Update optical path signal a reference value Ebenchmark;
If Ttouch≤|Ediff|<Tabnormal, then judge to produce touch;And optical path signal a reference value need not be updated
Ebenchmark。
Further, if | Ediff|≥TabnormalAnd | Ediff|>>Tnoise, then judge abnormal conditions occur;And it is not required to
Update optical path signal a reference value Ebenchmark。
Further, the regulation parameter EadaptAccording to difference EdiffGeneration linearly or nonlinearly changes;
If the regulation parameter EadaptAccording to difference EdiffLinear change is produced, then Irate1 is less than more than 0;
If the regulation parameter EadaptAccording to difference EdiffProduce nonlinear change:EdiffIt is worth bigger, EadaptGrowth get over
Slowly, wherein
Further, the Irate0.1 is less than more than 0.
A kind of infrared touch panel optical path signal self-adaptive regulating, including:
Basic parameter acquisition module, for obtaining optical path signal a reference value Ebenchmark, normal noise change threshold Tnoise,
Touch change threshold TtouchWith ANOMALOUS VARIATIONS threshold value Tabnormal;
Real-time parameter acquisition module, for obtaining optical path signal and obtaining the energy value E of current optical path signalcur;
Difference acquisition module, for obtaining optical path signal a reference value EbenchmarkWith the energy value E of current optical path signalcur's
Difference Ediff=Ebenchmark-Ecur;
Determination module, for being judged to produce the energy value E of current optical path signal according to the differencecurThe reason for, the original
Because including normal noise, normal touch and abnormal conditions.
Further, also include:
Update module, for according to the difference real-time update optical path signal a reference value Ebenchmark。
Further, also include:
Setting module, for setting optical path signal a reference value Ebenchmark, normal noise change threshold Tnoise, touch change
Threshold value TtouchWith ANOMALOUS VARIATIONS threshold value Tabnormal。
The beneficial effects of the invention are as follows:
The invention provides a kind of infrared touch panel optical path signal adaptive regulation method and device, calculated by providing software
The mode of method design adjusts relevant parameter according to signal fluctuation so that the relevant parameter of optical path signal can carry out self adaptation more
Newly, stability is high and can completely in real-time be effective against extraneous bounce interference.The present invention is in terms of Data Analysis Services
Set out, differentiation is analyzed according to the variable quantity of infrared light path energy to every infrared light path in real time, so as to carry out self adaptation
Every energy reference of light path of adjustment, can effectively buffer, it is ensured that reference data to acutely interference, slowly varying external environment
Smooth change, and buffer data processing method can also use the various mapping modes of linear processes.
Brief description of the drawings
Fig. 1 is a kind of infrared touch panel optical path signal adaptive regulation method flow chart of invention.
Fig. 2 is a kind of infrared touch panel optical path signal self-adaptive regulating block diagram of the invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, the present invention is made into one below in conjunction with accompanying drawing
Step ground is described in detail.
Embodiment 1:
A kind of infrared touch panel optical path signal adaptive regulation method, as shown in figure 1, including:
Step 101, obtains optical path signal a reference value Ebenchmark, normal noise change threshold Tnoise, touch change threshold
TtouchWith ANOMALOUS VARIATIONS threshold value Tabnormal;
Wherein, Ebenchmark, it is the reference of optical path signal change, obtained and real-time update without collection when touch;
Tnoise, when being touch-screen normal work, normal signal fluctuation, it may be possible to ambient noise or circuit noise belongs to
White noise category;
Ttouch, the change threshold scope of the light path correspondence energy for touching change is produced, more than environment or circuit noise, touch
The optical path change of the generation touched is not over signal criterion value;
Tabnormal;The energy variation of correspondence abnormal signal, usually abnormal intense environment change causes, such as rapid to draw
Curtain etc. is operated, and causes signal energy saturation, and the signal energy for now gathering does not have physical significance.
Step 102, obtains optical path signal and obtains the energy value E of current optical path signalcur;
Ecur;When touch-screen works, the light path energy at corresponding light path current time;Size is relevant with current touch state
System, it is possible to more than energy reference value Ebenchmark。
Step 103, obtains optical path signal a reference value EbenchmarkWith the energy value E of current optical path signalcurDifference Ediff
=Ebenchmark-Ecur;
Step 104, judges to produce the energy value E of current optical path signal according to the differencecurThe reason for, the reason bag
Include normal noise, normal touch and abnormal conditions.
Each optical path information in each frame data of correspondence is carried out according to above-mentioned steps.
According to energy reference Ebenchmark, compare the ENERGY E of current optical path signalcur;By contrasting two differences of energy,
To judge current light path touch condition, the ENERGY E of current optical path signal is judgedcurThe reason for change:Normal noise, normal touch
And abnormal conditions.Current optical path signal energy and energy reference value and corresponding difference are calculated, so as to analyze judge difference
Changing Pattern, is updated energy reference value E in real timebenchmark, it is ensured that what energy reference value can be stablized keeps up with environmental change,
Light path collection is more stable, so as to be finally reached the purpose of touch-screen steady operation.
Further, also include:
Step 105, according to the difference real-time update optical path signal a reference value Ebenchmark。
Specifically, the optical path signal a reference value Ebenchmark, noise change threshold Tnoise, touch change threshold TtouchWith
ANOMALOUS VARIATIONS threshold value TabnormalCan be set according to actual conditions.
Further, if Tnoise<|Ediff|<Ttouch, then judge normal noise occur and touched without producing;And more
New optical path signal a reference value Ebenchmark, the E after renewalbenchmarkIt is former EbenchmarkWith regulation parameter EadaptSum, the regulation
Parameter is Eadapt=Ediff*Irate.Wherein, Irate1 is less than more than 0, in order to preferably anti-outburst surroundings are disturbed, general IrateGreatly
0.1 is less than in 0.
This kind of situation is not produce touch, but because energy variation is, it is necessary to update energy base caused by external environment
Quasi- value, it is ensured that energy reference stably can keep up with environmental change, make signal acquisition more stable.
Specifically, the regulation parameter EadaptAccording to difference EdiffNonlinear change is produced (certainly, in other embodiments
In, it is also possible to produce linear change):EdiffIt is worth bigger, EadaptGrowth it is slower, so as to reach self adaptation effect.Preferably,
Further, if | Ediff|≤Tnoise, then judge normal noise occur and touched without producing;And need not
Update optical path signal a reference value Ebenchmark。
If Ttouch≤|Ediff|<Tabnormal, then judge to produce touch;And optical path signal a reference value need not be updated
Ebenchmark.This kind of situation explanation is currently to touch to lift or fall, and optical path signal change is normal under normal touch pattern
's.
Further, if | Ediff|≥TabnormalAnd | Ediff|>>Tnoise, then judge abnormal conditions occur;And it is not required to
Update optical path signal a reference value Ebenchmark.Illustrate that the energy quantitative change of signal is strong, and much larger than energy under normal non-tactile state
Amount change, illustrates now to be likely to be encountered strong environmental change, is now abnormal data.
The embodiment of the present invention carries out data analysis from Software for Design data analysis aspect, can overcome light circuit-switched data light to external world
According to the unstability of factor, the optical path signal energy reference value of final real embodiment external environment can be adapted to.In various plays
In the case of strong or slow, play and slow down effect, real-time treatment, and algorithm complex is low, and effect is obvious.Contrast is adopted at present
It is more flexible anti-external environmental interference to be carried out with modes such as circuit control and physics light shields;Light path reference data value updates can adopt
With the mapping method of linear processes, method is more changeable, and being referred to specific environment carries out selective implementation.
Embodiment 2:
Following is apparatus of the present invention embodiment, can be used for performing the inventive method embodiment.For apparatus of the present invention reality
The details not disclosed in example is applied, the inventive method embodiment is refer to.
A kind of infrared touch panel optical path signal self-adaptive regulating, the device can be realized second in above method example
The function of subscription client, the function can be realized by hardware, it is also possible to performed corresponding software by hardware and realized.
As shown in Fig. 2 the device can include:
Basic parameter acquisition module 201, for obtaining optical path signal a reference value Ebenchmark, normal noise change threshold
Tnoise, touch change threshold TtouchWith ANOMALOUS VARIATIONS threshold value Tabnormal;
Real-time parameter acquisition module 202, for obtaining optical path signal and obtaining the energy value E of current optical path signalcur;
Difference acquisition module 203, for obtaining optical path signal a reference value EbenchmarkWith the energy value of current optical path signal
EcurDifference Ediff=Ebenchmark-Ecur;
Determination module 204, for being judged to produce the energy value E of current optical path signal according to the differencecurThe reason for, institute
Stating reason includes normal noise, normal touch and abnormal conditions.
Update module 205, for according to the difference real-time update optical path signal a reference value Ebenchmark。
Setting module 206, for setting optical path signal a reference value Ebenchmark, normal noise change threshold Tnoise, touch and become
Change threshold value TtouchWith ANOMALOUS VARIATIONS threshold value Tabnormal。
The above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications also should
It is considered as protection scope of the present invention.