CN109738004A - The calibration method and device, electronic equipment and storage medium of proximity sensor - Google Patents
The calibration method and device, electronic equipment and storage medium of proximity sensor Download PDFInfo
- Publication number
- CN109738004A CN109738004A CN201910068695.XA CN201910068695A CN109738004A CN 109738004 A CN109738004 A CN 109738004A CN 201910068695 A CN201910068695 A CN 201910068695A CN 109738004 A CN109738004 A CN 109738004A
- Authority
- CN
- China
- Prior art keywords
- value
- display screen
- touch display
- proximity sensor
- light intensity
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Landscapes
- Position Input By Displaying (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
The embodiment of the present application provides the calibration method and device, electronic equipment and readable storage medium storing program for executing of a kind of proximity sensor, the above method is applied to be provided with the electronic equipment of proximity sensor and ambient light sensor below touch display screen, it specifically includes: when electronic equipment is in breath screen state, obtain the light intensity value that the ambient light sensor detects, according to the light intensity value, determine the top of touch display screen with the presence or absence of shelter, when shelter is not present in determination, to being calibrated close to threshold value for proximity sensor.The embodiment of the present application is in the case where ceasing screen state, the top of touch display screen can be judged with the presence or absence of shelter using ambient light sensor, and above touch display screen under conditions of have no occluder, realize to the accurate calibration of proximity sensor, can effectively solve the problem that proximity sensor close to dysfunction the problem of.
Description
Technical field
This application involves technical field of electronic equipment, and in particular to a kind of calibration method of proximity sensor and device, electricity
Sub- equipment and storage medium.
Background technique
As the screen accounting of electronic equipment is higher and higher, shield the epoch at hand comprehensively, and with the hair of comprehensive screen technology
It opens up, main reference scheme certainly will be become close to scheme under screen.
It is still had under screen close to scheme and needs to overcome the problems, such as, connect for example, the proximity sensor in electronic equipment exists
The problem of nearly dysfunction.
Summary of the invention
The embodiment of the present application provides the calibration triggering method and device of a kind of proximity sensor, electronic equipment and storage are situated between
Matter, can solve proximity sensor in the prior art close to dysfunction the problem of.
In a first aspect, the embodiment of the present application provides a kind of calibration method of proximity sensor, this method is set applied to electronics
It is standby, it is provided with proximity sensor and ambient light sensor below the touch display screen of the electronic equipment, this method comprises:
When the electronic equipment is in breath screen state, the light intensity value that the environment photosensitive sensors detect is obtained;
According to the light intensity value, determine the top of the touch display screen with the presence or absence of shelter;
When shelter is not present in the top of the touch display screen, to being carried out close to threshold value for the proximity sensor
Calibration.
Second aspect, the embodiment of the present application also provide a kind of calibrating installation of proximity sensor, which is applied to electronics
The touch display screen lower section of equipment, the electronic equipment is provided with proximity sensor and ambient light sensor, which includes:
Module is obtained, for obtaining the environment photosensitive sensors detection when the electronic equipment is in breath screen state
The light intensity value arrived;
Determining module, for determining the top of the touch display screen with the presence or absence of shelter according to the light intensity value;
Calibration module, for when the top of the touch display screen be not present shelter when, to the proximity sensor
It is calibrated close to threshold value.
The third aspect, the embodiment of the present application also provide a kind of electronic equipment, be placed in below touch display screen close to sensing
Device and ambient light sensor, memory, processor and it is stored in the meter run on the memory and on the processor
Calculation machine program realizes the calibration of proximity sensor as described in relation to the first aspect when the processor executes the computer program
Each step in method.
Fourth aspect also provides a kind of readable storage medium storing program for executing in the embodiment of the present application, is stored thereon with computer program, institute
When stating computer program and being executed by processor, each step in the calibration method of proximity sensor as described in relation to the first aspect is realized
Suddenly.
The calibration method of proximity sensor provided by the embodiments of the present application, this method are applied to setting below touch display screen
There is the electronic equipment of proximity sensor and ambient light sensor, this method comprises: obtaining when electronic equipment is in breath screen state
The light intensity value that the ambient light sensor detects determines the top of touch display screen with the presence or absence of screening according to the light intensity value
Block material, when shelter is not present in determination, to being calibrated close to threshold value for proximity sensor.In the case where ceasing screen state, pass through
Light intensity value in the touch display screen detected using ambient light sensor in each region can effectively judge to touch aobvious
The top of display screen whether there is shelter, make it possible to effectively determine whether electronic equipment meets the calibration to proximity sensor
Condition.And above electronic equipment is in breath screen state and touch display screen under conditions of have no occluder, realize to close sensing
The accurate calibration of device, can effectively solve the problem that proximity sensor close to dysfunction the problem of.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those skilled in the art without creative efforts, can also basis
These attached drawings obtain other attached drawings.
Fig. 1 is the structural block diagram of a kind of electronic equipment in the embodiment of the present application;
Fig. 2 is the flow diagram of the calibration method of proximity sensor in the embodiment of the present application;
Fig. 3 is the sub-process schematic diagram of the calibration method of proximity sensor in the embodiment of the present application;
Fig. 4 is another sub-process schematic diagram of the calibration method of proximity sensor in the embodiment of the present application;
Fig. 5 is the another sub-process schematic diagram of the calibration method of proximity sensor in the embodiment of the present application;
Fig. 6 is the program module schematic diagram of the calibrating installation of proximity sensor in the embodiment of the present application;
Fig. 7 is the subroutine module schematic diagram of the calibrating installation of proximity sensor in the embodiment of the present application
Fig. 8 is another subroutine module schematic diagram of the calibrating installation of proximity sensor in the embodiment of the present application;
Fig. 9 is the another subroutine module schematic diagram of the calibrating installation of proximity sensor in the embodiment of the present application.
Specific embodiment
In order to make the invention's purpose, features and advantages of the invention more obvious and easy to understand, below in conjunction with the application
Attached drawing in embodiment, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described reality
Applying example is only a part of the embodiment of the present invention, and not all embodiments.Based on the embodiments of the present invention, those skilled in the art
Member's every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Fig. 1 shows the structural block diagram of a kind of electronic equipment.The calibration side of proximity sensor provided by the embodiments of the present application
Method can be applied in electronic equipment 10 as shown in Figure 1, which can be, but not limited to include: that need to maintain by battery
It operates normally and supports network and smart phone, the tablet computer of download function etc..
As shown in Figure 1, electronic equipment 10 includes memory 101, storage control 102, one or more (is only shown in figure
One) processor 103, Peripheral Interface 104, radio-frequency module 105, Touch Screen 106, proximity sensor 107 and environment light biography
Sensor 108.These components are mutually communicated by one or more communication bus/signal wire 109.
It is appreciated that structure shown in FIG. 1 is only to illustrate, the structure of electronic equipment is not caused to limit.Electronics is set
Standby 10 may also include than shown in Fig. 1 more perhaps less component or with the configuration different from shown in Fig. 1.It is shown in FIG. 1
Each component can be realized using hardware, software, or its combination.
Memory 101 can be used for storing software program and module, such as the school of the proximity sensor in the embodiment of the present application
Corresponding program instruction/the module of quasi- method and apparatus, the software program that processor 103 is stored in memory 101 by operation
And module, thereby executing various function application and data processing, that is, realize the calibration method of above-mentioned proximity sensor with
Device.
Memory 101 may include high speed random access memory, may also include nonvolatile memory, such as one or more magnetic
Property storage device, flash memory or other non-volatile solid state memories.In some instances, memory 101 can further comprise
The memory remotely located relative to processor 103, these remote memories can pass through network connection to electronic equipment 10.On
The example for stating network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.Processor 103
And other possible components can carry out the access of memory 101 under the control of storage control 102.
Various input/output devices are couple CPU and memory 101 by Peripheral Interface 104.The operation of processor 103 is deposited
Various softwares, instruction in reservoir 101 are to execute the various functions of electronic equipment 10 and carry out data processing.
In some embodiments, Peripheral Interface 104, processor 103 and storage control 102 can be in one single chips
It realizes.In some other example, they can be realized by independent chip respectively.
Radio-frequency module 105 is used to receive and transmit electromagnetic wave, realizes the mutual conversion of electromagnetic wave and electric signal, thus with
Communication network or other equipment are communicated.Radio-frequency module 105 may include various existing for executing the electricity of these functions
Circuit component, for example, antenna, RF transceiver, digital signal processor, encryption/deciphering chip, subscriber identity module (SIM) card,
Memory etc..Radio-frequency module 105 can be with the wireless network progress of various networks such as internet, intranet, preset type
Communication is communicated by the wireless network of preset type with other equipment.The wireless network of above-mentioned preset type can wrap
Include cellular telephone networks, WLAN or Metropolitan Area Network (MAN).Various communications can be used in the wireless network of above-mentioned preset type
Standard, agreement and technology, including but not limited to global system for mobile communications (Global System for Mobile
Communication, GSM), enhanced mobile communication technology (Enhanced Data GSM Environment, EDGE) is wide
Band Code Division Multiple Access (Wideband Code Division Multiple Access, W-CDMA), Code Division Multiple Access
(Code Division Access, CDMA), time division multiple access technology (Time Division Multiple Access, TDMA),
Bluetooth, adopting wireless fidelity technology (Wireless-Fidelity, WiFi) (such as American Institute of Electrical and Electronics Engineers's standard IEEE
802.11a, IEEE 802.11b, IEEE802.11g and/or IEEE 802.11n), the networking telephone (Voice over
Internet Protocal, VoIP), worldwide interoperability for microwave accesses (Worldwide Interoperability for
Microwave Access, Wi-Max), other for mail, instant messaging and short message agreement and any other is suitable
Communications protocol.
Touch Screen 106 provides an output and input interface simultaneously between electronic equipment and user.Specifically, touch-control
Screen 106 shows video output to user, and the content of these videos output may include text, figure, video and its any group
It closes.Some outputs are the result is that correspond to some user interface objects.Touch Screen 106 also receives the input of user, such as user
The gesture operations such as click, sliding, so that user interface object responds the input of these users.Detect user's input
Technology can be based on resistance-type, condenser type or any other possible touch control detection technology.106 display unit of Touch Screen
Specific example include but is not limited to liquid crystal display or light emitting polymer displays.
Proximity sensor 107 and ambient light sensor 108 are set to 106 lower section of Touch Screen of electronic equipment 10, wherein
Proximity sensor 107 is a kind of device with perception object proximity ability, it has close object using displacement sensor
There is sensitivity characteristic to identify the close of object, and exports corresponding proximity values, such as infrared proximity transducer.Ambient light sensor
108 can perceive ambient light situation, and output intensity angle value.
The calibration method of proximity sensor in the embodiment of the present application is described based on above-mentioned electronic equipment 10.
Referring to Fig. 2, Fig. 2 is the flow diagram of the calibration method of proximity sensor in the embodiment of the present application, this implementation
In example, the calibration method of above-mentioned proximity sensor includes:
Step 201, the electronic equipment be in breath screen state when, obtain the light that the environment photosensitive sensors detect
Intensity value.
Proximity sensor can be a variety of different types of proximity sensors, commonly can be infrared proximity transducer,
By taking infrared proximity transducer as an example, infrared proximity transducer can emit infrared ray to touch panel direction, and it is anti-then to measure object
It is emitted back towards the infra-red intensity come and comes the distance between judgment object and infrared proximity transducer, the infra-red intensity received is got over
By force, then it represents that the distance between itself and object are smaller.Infrared proximity transducer can convert the infra-red intensity measured to
The measured value of its proportional, the measured value are properly termed as proximity values, and the proximity values that infrared proximity transducer obtains are bigger,
Indicate that the distance between itself and object are smaller.
In general, the proximity values that proximity sensor measures can determine that it is proximity state or separate shape between object
State, and the judgement of the state when proximity values are greater than close to threshold value, is then can determine based on being determined close to threshold value
Proximity state between proximity sensor and object, when proximity values are less than close to threshold value, can determine proximity sensor with
It is far from state between object.
Wherein, when proximity sensor is arranged in below the touch screen of mobile terminal, bottom will be generated and made an uproar value, wherein bottom is made an uproar value
When any object is not present for the top of touch display screen, light is detected in mobile terminal internal diffraction and by proximity sensor
Signal value, the bottom of referred to as proximity sensor are made an uproar value.
Currently, shielding the position of lower proximity sensor after pressing electronic equipment screen two sides or electronic equipment are fallen
Setting may change, and the bottom of proximity sensor value of making an uproar is caused to change, thus can cause close to dysfunction, therefore,
Need calibrating close to threshold value to proximity sensor.
It should be noted that if needing to calibrate proximity sensor, then need to be in breath screen state in touch screen, and
It is carried out under conditions of have no occluder above touch screen.Wherein, it needs to be because starting under bright screen state close in breath screen state
When sensor, it may appear that the phenomenon that touch screen flashes, screen flicker will affect the brightness of touch screen, and the variation of brightness, which will affect, to be connect
The collected proximity values of nearly sensor, lead to alignment error.Have no occluder above touch screen is needed, is the variation of the value because bottom is made an uproar
Result in proximity sensor close to dysfunction, therefore, if desired calibrated to close to threshold value, need to measure true
Bottom make an uproar value.
Wherein it is possible to preset a calibration cycle in the electronic device, i.e., judgement at regular intervals is once close to sensing
Whether device, which needs, is calibrated, if it is determined that is needed to calibrate proximity sensor, is then touched by ambient light sensor detection aobvious
Light intensity value above display screen.
Step 202, according to the light intensity value, determine the top of the touch display screen with the presence or absence of shelter.
It is understood that when electronic equipment be in breath screen state, and top be not present shelter when, in available light
Under, the light intensity that environment photosensitive sensors receive can be relatively strong, and the light of each region is strong above touch display screen in other words
It spends more uniform;If electronic equipment is in breath screen state, and there are the light that when shelter, environment photosensitive sensors are received for top
If line intensity then can be compared with the light intensity of each region will appear difference above touch display screen in other words.Therefore in the present embodiment,
After the light intensity value that the environment photosensitive sensors got detect, it can be shown according to the light intensity value to determine to touch
The top of display screen whether there is shelter.
Step 203, when shelter is not present in the top of the touch display screen, to the proximity sensor close to door
Limit value is calibrated.
In the present embodiment, when shelter is not present in the top for determining touch display screen, i.e. expression proximity sensor meets
Calibration condition, at this time can calibrating close to threshold value to proximity sensor;When the top for determining touch display screen exists
When shelter, i.e. expression proximity sensor is unsatisfactory for calibration condition, at this time temporarily not to proximity sensor close to threshold value into
Row calibration can wait preset time period, or when next calibration cycle arrives, redefine the top of touch display screen
With the presence or absence of shelter, if there is no shelter, then calibrating close to threshold value to proximity sensor, if there is screening
Block material then waits preset time period again, or waits next calibration cycle, and so on.
The calibration method of proximity sensor provided by the embodiments of the present application, this method are applied to setting below touch display screen
There is the electronic equipment of proximity sensor and ambient light sensor, this method is in the case where ceasing screen state, by utilizing ambient light sensor
The light intensity value detected can effectively judge that the top of touch display screen with the presence or absence of shelter, makes it possible to effective
Determine whether electronic equipment meets the calibration condition to proximity sensor.And breath screen state is in electronic equipment and touches display
Under conditions of the have no occluder of screen top, realizes to the accurate calibration of proximity sensor, can effectively solve the problem that connecing for proximity sensor
The problem of nearly dysfunction.
Based on the above embodiment, the embodiment of the present application provides following several light intensity values according in each region, determines
The top of touch display screen whether there is the mode of shelter.
Specifically, Fig. 3 is the sub-process schematic diagram of the calibration method of proximity sensor in the embodiment of the present application referring to Fig. 3,
In the embodiment of the present application, according to light intensity value in above-mentioned steps 202, determine that the top of touch display screen whether there is shelter,
It specifically includes:
Light intensity value in step 301, each region divided using the touch display screen calculates the first average value, and
Obtain the second average value of the proximity values of the proximity sensor within a preset period of time.
In the present embodiment, in order to when electronic equipment is in breath screen state, it is determined whether need to proximity sensor
Calibrated close to threshold value, the touch display screen of electronic equipment first can be divided into multiple regions, be set in each region
Ambient light sensor is set, then detects the light intensity value in each region respectively by each ambient light sensor.
Specifically, the touch display screen that environment photosensitive sensors detect can be obtained within the same period (such as 1 second)
Light intensity value in each region of division, and every prefixed time interval (such as 0.1 second), obtain a proximity sensor
Proximity values, then calculate the first average value of the light intensity value in each region, and calculate proximity sensor in the above-mentioned period
Second average value of interior proximity values.
Step 302, according to first average value and the second average value, determine whether the top of the touch display screen deposits
In shelter.
It is understood that when electronic equipment be in breath screen state, and top be not present shelter when, in available light
Under, the light intensity that each region that touch display screen divides receives is identical, i.e., the light intensity value in each region can be kept
Unanimously;If electronic equipment is in breath screen state, and there are each regions that when shelter, touch display screen is divided to receive for top
To light intensity then to will appear the light intensity value in difference or each region obviously different from the light intensity value of environment light.
It, can be according in each region after the light intensity value in the touch display screen each region got therefore in the present embodiment
Light intensity value, to determine the top of touch display screen with the presence or absence of shelter.
Specifically, determining that bottom is made an uproar upper limit value using the first average value;Wherein, when the first average value is more than or equal to preset
When intensity threshold, bottom upper limit value of making an uproar is the first upper limit value, and when the first average value is less than intensity threshold, bottom upper limit value of making an uproar is
Second upper limit value, wherein the first upper limit value is greater than the second upper limit value.
It is understood that the proximity values of proximity sensor output, will receive the influence of surrounding environment light, work as ambient enviroment
When the light intensity value of light is bigger, the proximity values exported close to microphone are also bigger.
Therefore in the present embodiment, when above-mentioned first average value is greater than or equal to preset intensity threshold, bottom is made an uproar the upper limit
Value is arranged to a biggish numerical value, is such as determined as the first upper limit value;It, will when above-mentioned first average value is less than intensity threshold
Bottom upper limit value of making an uproar is arranged to a lesser numerical value, is such as determined as the second upper limit value, and the first upper limit value is greater than the second upper limit value.
Wherein, when the top for determining touch display screen whether there is shelter, if above-mentioned second average value is greater than or waits
It makes an uproar upper limit value in above-mentioned bottom, it is determined that there are shelters above touch display screen;If above-mentioned second average value is less than above-mentioned bottom
When upper limit value of making an uproar, it is determined that shelter is not present in the top of touch display screen.
The calibration method of proximity sensor provided by the embodiments of the present application provides a kind of top of determining touch display screen
With the presence or absence of the mode of shelter, specifically include: the light intensity value in each region divided using touch display screen calculates the
One average value, and obtain the second average value of the proximity values of proximity sensor within a preset period of time;According to the first average value and
Second average value determines the top of touch display screen with the presence or absence of shelter, i.e. the present embodiment can be each by touch display screen
Luminous intensity average value in a region and proximity sensor within a preset period of time close to average value, to determine touch display screen
Top whether there is shelter.
It further, is another sub-process of the calibration method of proximity sensor in the embodiment of the present application referring to Fig. 4, Fig. 4
Schematic diagram in the embodiment of the present application, according to light intensity value in above-mentioned steps 202, determines that the top of touch display screen whether there is
Shelter specifically includes:
Step 401, from the light intensity value in each region that touch display screen divides, choose largest light intensity angle value and most
Small light intensity value.
It is understood that when shelter small volume or shelter the top of touch display screen blocked area
When domain is smaller, the light intensity value in touch display screen partial region only will affect, i.e. the top of touch display screen may
Be blocked region and the region that is not blocked are existed simultaneously, can be existed due to being blocked region with the light intensity value in non-occluded area
Apparent difference, therefore largest light intensity angle value and minimum intensity of light angle value can be chosen from the light intensity value in each region, come
It determines above touch display screen with the presence or absence of shelter.
Step 402 presets the first threshold when the difference of the largest light intensity angle value and the minimum intensity of light angle value is greater than or equal to
When value, determine that there are shelters above the touch display screen.
It is understood that above touch display screen, there are shelters, and the shelter has only blocked touch display
When the partial region of screen, the light intensity value being blocked in region and non-occluded area has apparent difference, that is, be blocked region
Light intensity value can be significantly less than the light intensity value in non-occluded area.
Therefore, the present embodiment can be greater than or equal to default first threshold in the difference of largest light intensity angle value and minimum intensity of light angle value
When value, determine that there are shelters above touch display screen.Wherein, it above-mentioned default first preset can be obtained by test of many times
?.
Step 403, when the difference of the largest light intensity angle value and the minimum intensity of light angle value is less than preset first threshold value, really
Shelter is not present in the top of the fixed touch display screen.
Wherein, when shelter is not present in the top of touch display screen, the light intensity value in each region can be kept substantially
Unanimously, i.e., in the light intensity value in each region, largest light intensity angle value is identical as minimum intensity of light angle value or difference very little.
Therefore, the present embodiment can when the difference of largest light intensity angle value and minimum intensity of light angle value is less than preset first threshold value,
Determine that shelter is not present in the top of touch display screen.
The calibration method of proximity sensor provided by the embodiments of the present application provides another and determines touch display screen
Top whether there is the mode of shelter, specifically include: from the light intensity value in touch display screen each region, choose maximum
Light intensity value and minimum intensity of light angle value;When the difference of largest light intensity angle value and minimum intensity of light angle value is greater than or equal to preset first threshold value
When, determine that there are shelters above touch display screen;When the difference of largest light intensity angle value and minimum intensity of light angle value is less than default the
When one threshold value, the top of touch display screen is determined there is no shelter, i.e. the present embodiment can pass through each area of touch display screen
In light intensity value in domain, the difference of largest light intensity angle value and minimum intensity of light angle value, to determine whether the top of touch display screen deposits
In shelter.
It further, is the another sub-process of the calibration method of proximity sensor in the embodiment of the present application referring to Fig. 5, Fig. 5
Schematic diagram in the embodiment of the present application, according to the light intensity value in each region in above-mentioned steps 202, determines touch display screen
Top whether there is shelter, specifically include:
Step 501, using the light intensity value in described each region, calculate the variance yields of luminous intensity.
It is understood that when shelter small volume or shelter the top of touch display screen blocked area
When domain is smaller, the light intensity value in touch display screen partial region only will affect, i.e. the top of touch display screen may
Be blocked region and the region that is not blocked are existed simultaneously, can be existed due to being blocked region with the light intensity value in non-occluded area
Apparent difference, therefore can be by calculating the variance yields of the light intensity value in each region, to determine above touch display screen
With the presence or absence of shelter.
Step 502, when the variance yields is greater than or equal to default second threshold, determine the top of the touch display screen
There are shelters.
It is understood that above touch display screen, there are shelters, and the shelter has only blocked touch display
When the partial region of screen, the light intensity value being blocked in region and non-occluded area has apparent difference, i.e. touch display screen
Can there are apparent variation or difference between light intensity value in each region.
Therefore, the present embodiment can determine that described touch shows when above-mentioned variance yields is greater than or equal to default second threshold
There are shelters above display screen.Wherein, it above-mentioned default second preset can be obtained by test of many times.
Step 503, when the variance yields is less than default second threshold, determine that the top of the touch display screen is not present
Shelter.
Wherein, when shelter is not present in the top of touch display screen, the luminous intensity in each region is consistent substantially,
Difference between light intensity value i.e. in each region can very little.
Therefore, the present embodiment can determine the touch display screen when above-mentioned variance yields is less than default second threshold
Shelter is not present in top.
The calibration method of proximity sensor provided by the embodiments of the present application, and provide a kind of the upper of determining touch display screen
Side whether there is the mode of shelter, specifically includes: using the light intensity value in each region, calculating the variance yields of luminous intensity;
When the variance yields is greater than or equal to default second threshold, determine that there are shelters above touch display screen;When the variance yields
When less than default second threshold, the top of the touch display screen is determined there is no shelter, i.e. the present embodiment can pass through touching
The variance yields of the light intensity value in display screen each region is touched, to determine the top of touch display screen with the presence or absence of shelter.
It should be noted that the application can be determined using any one mode in three of the above mode and be touched display
The top of screen whether there is shelter.In addition, the mode that combination determines can also be used, that is, adopt in order to improve the accuracy of judgement
With any two ways or two or more modes in three of the above mode, to determine that the top of touch display screen whether there is
Shelter.
In addition, the application can also determine the top of touch display screen with the presence or absence of shelter, example otherwise
Ultrasonic wave is such as emitted to the top of touch display screen by ultrasonic sensor preset in electronic equipment, or is set by electronics
Preset millimeter wave sensor emits millimeter wave to the top of touch display screen in standby, come determine touch display screen top whether
There are shelters.
I.e. in the embodiment of the present application, determine that the top of touch display screen is very clever with the presence or absence of the decision procedure of shelter
Living, all tops that can determine touch display screen can be applied to the application with the presence or absence of the decision procedure of shelter.
Further, based on the above embodiment, in the embodiment of the present application, proximity sensor is connect in above-mentioned steps 203
Nearly threshold value is calibrated, and is specifically included:
Step 1: the corresponding relationship between preset light intensity value and preset correction value is searched using the first average value, benefit
With with the first average value there is the correction value of corresponding relationship to be modified to the second average value, makes an uproar using revised value the bottom of as
Value, above-mentioned first average value are the average value of the light intensity value in each region, and above-mentioned second average value is preset time period
The average value of interior proximity values.
In the present embodiment, many experiments are first passed through in advance, are determined the corresponding relationship between light intensity value and correction value, are gone forward side by side
Row saves.Pair when needing to calibrate proximity sensor, between the light intensity value and preset correction value pre-saved
In should being related to, correction value corresponding to the average value of the light intensity value in each region of touch display screen is searched, is then repaired using this
Positive value is modified the average value of proximity values in preset time period, and the revised value bottom new as proximity sensor is made an uproar
Value.
Step 2: being made an uproar value calibrating close to threshold value to the proximity sensor according to the bottom.
Wherein, it makes an uproar after value obtaining the new bottom of proximity sensor, i.e., proximity sensor is connect using bottom value of making an uproar
Nearly threshold value is calibrated.Specifically, obtaining the default setting parameter of proximity sensor, which includes: initial
Bottom is made an uproar value and initially close to threshold value.Then determine that bottom value of making an uproar is made an uproar the increment value or decreasing value of value relative to initial bottom, according to
The increment value or decreasing value to initially being calibrated close to threshold value, after being calibrated close to threshold value.
Wherein, determine bottom make an uproar value make an uproar relative to initial bottom value increment value after, can calculate initially close to threshold value
With above-mentioned increment value and, and by it is calculated and as after calibration close to threshold value;Or determine bottom make an uproar value relative to
Initial bottom make an uproar value decreasing value after, can calculate initially close to the difference of threshold value and above-mentioned decreasing value, and by calculated difference
As after calibration close to threshold value.
The calibration method of proximity sensor provided by the embodiment of the present application, comprising: searched using the first average value default
Light intensity value and preset correction value between corresponding relationship, have the correction value of corresponding relationship to the using with the first average value
Two average values are modified, and are made an uproar value using revised value the bottom of as, and above-mentioned first average value is in each region of touch display screen
The average value of light intensity value, the second average value are the average value of proximity values in preset time period;Then it is made an uproar value pair according to the bottom
The proximity sensor is calibrated close to threshold value.I.e. the application can be in breath screen state in electronic equipment and touch aobvious
Above display screen under conditions of have no occluder, realizes to the accurate calibration of proximity sensor, can effectively solve the problem that proximity sensor
The problem of close to dysfunction.
Further, the embodiment of the present application also provides a kind of calibrating installation 200 of proximity sensor, is referring to Fig. 6, Fig. 6
The program module schematic diagram of the calibrating installation of proximity sensor in the embodiment of the present application, in the present embodiment, above-mentioned proximity sensor
Calibrating installation 200 include:
Module 601 is obtained, for obtaining the light that environment photosensitive sensors detect when electronic equipment is in breath screen state
Intensity value.
Determining module 602, for determining the top of touch display screen with the presence or absence of shelter according to light intensity value.
Calibration module 603, for when shelter is not present in the top of touch display screen, to proximity sensor close to door
Limit value is calibrated.
The calibrating installation 200 of proximity sensor provided by the embodiments of the present application is provided with applied to touch display screen lower section
The electronic equipment of proximity sensor and ambient light sensor, may be implemented: in the case where ceasing screen state, by utilizing ambient light sensor
The light intensity value detected can effectively judge that the top of touch display screen with the presence or absence of shelter, makes it possible to effective
Determine whether electronic equipment meets the calibration condition to proximity sensor.And breath screen state is in electronic equipment and touches display
Under conditions of the have no occluder of screen top, realizes to the accurate calibration of proximity sensor, can effectively solve the problem that connecing for proximity sensor
The problem of nearly dysfunction.
Specifically, Fig. 7 is that the subroutine module of the calibrating installation of proximity sensor in the embodiment of the present application shows referring to Fig. 7
It is intended to, in the embodiment of the present application, above-mentioned determining module 602 is specifically included:
First computing module 701, the light intensity value in each region for being divided using the touch display screen are calculated
First average value, and obtain the second average value of the proximity values of the proximity sensor within a preset period of time.
First determining module 702, for determining the touch display screen according to first average value and the second average value
Top whether there is shelter.
The calibrating installation 200 of proximity sensor provided by the embodiments of the present application, may be implemented: be divided using touch display screen
Each region in light intensity value calculate the first average value, and obtain proximity sensor proximity values within a preset period of time
Second average value;According to the first average value and the second average value, determine that the top of touch display screen whether there is shelter, i.e., originally
Embodiment can be by luminous intensity average value in touch display screen each region and proximity sensor within a preset period of time
Close to average value, to determine the top of touch display screen with the presence or absence of shelter.
It further, is another subprogram of the calibrating installation of proximity sensor in the embodiment of the present application referring to Fig. 8, Fig. 8
Module diagram, in the embodiment of the present application, above-mentioned determining module 602 is specifically included:
Module 801 is chosen, for choosing largest light intensity angle value and minimum light intensity from the light intensity value in each region
Value.
Second determining module 802 is greater than or equal to default for the difference when largest light intensity angle value and minimum intensity of light angle value
When one threshold value, determine that there are shelters above touch display screen.
Third determining module 803 is less than preset first threshold value for the difference when largest light intensity angle value and minimum intensity of light angle value
When, determine that shelter is not present in the top of touch display screen.
The calibrating installation 200 of proximity sensor provided by the embodiments of the present application, may be implemented: from each area of touch display screen
In light intensity value in domain, largest light intensity angle value and minimum intensity of light angle value are chosen;When largest light intensity angle value and minimum intensity of light angle value
Difference be greater than or equal to preset first threshold value when, determine that there are shelters above touch display screen;When largest light intensity angle value with
When the difference of minimum intensity of light angle value is less than preset first threshold value, determine that shelter, i.e. this implementation is not present in the top of touch display screen
Example can be by the way that in the light intensity value in touch display screen each region, the difference of largest light intensity angle value and minimum intensity of light angle value be come
Determine the top of touch display screen with the presence or absence of shelter.
It further, is the another subprogram of the calibrating installation of proximity sensor in the embodiment of the present application referring to Fig. 9, Fig. 9
Module diagram, in the embodiment of the present application, above-mentioned determining module 602 is specifically included:
Second computing module 901, for calculating the variance yields of luminous intensity using the light intensity value in each region.
4th determining module 902, for determining touch display screen when variance yields is greater than or equal to default second threshold
There are shelters for top.
5th determining module 903, for determining the top of touch display screen not when variance yields is less than default second threshold
There are shelters.
The calibrating installation 200 of proximity sensor provided by the embodiments of the present application, may be implemented: utilize the light in each region
Intensity value calculates the variance yields of luminous intensity;When the variance yields is greater than or equal to default second threshold, touch display screen is determined
There are shelters for top;When the variance yields is less than default second threshold, determines that the top of the touch display screen is not present and hide
Block material, i.e. the present embodiment can touch display by the variance yields of the light intensity value in touch display screen each region to determine
The top of screen whether there is shelter.
Further, the application also provides a kind of electronic equipment, including memory, and processor and storage are on a memory simultaneously
The computer program that can be run on a processor, the processor realize the calibration of above-mentioned proximity sensor when executing computer program
Each step in each embodiment that method provides.
Further, the application also provides a kind of storage medium, is stored thereon with computer program, the computer program quilt
Processor realizes each step in each embodiment that the calibration method of above-mentioned proximity sensor provides when executing.
Each functional module in each embodiment of the present invention can integrate in a processing module, be also possible to each
Module physically exists alone, and can also be integrated in a module with two or more modules.Above-mentioned integrated module both may be used
To use formal implementation of hardware, can also be realized in the form of software function module.
If the integrated module is realized in the form of software function module and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the present invention
Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey
The medium of sequence code.
It should be noted that for the various method embodiments described above, describing for simplicity, therefore, it is stated as a series of
Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because
According to the present invention, certain steps can use other sequences or carry out simultaneously.Secondly, those skilled in the art should also know
It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules might not all be this hair
Necessary to bright.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment
Point, it may refer to the associated description of other embodiments.
The above are to a kind of calibration method of proximity sensor provided by the present invention and device, electronic equipment and readable deposit
The description of storage media, for those skilled in the art, according to the thought of the embodiment of the present application, in specific embodiment and application
There will be changes in range, and to sum up, the contents of this specification are not to be construed as limiting the invention.
Claims (10)
1. a kind of calibration method of proximity sensor, which is characterized in that the method is applied to electronic equipment, the electronic equipment
Touch display screen below be provided with proximity sensor and ambient light sensor, which comprises
When the electronic equipment is in breath screen state, the light intensity value that the environment photosensitive sensors detect is obtained;
According to the light intensity value, determine the top of the touch display screen with the presence or absence of shelter;
When shelter is not present in the top of the touch display screen, school is carried out close to threshold value to the proximity sensor
It is quasi-.
2. the method according to claim 1, wherein described according to the light intensity value, determine it is described touch it is aobvious
The top of display screen whether there is shelter, comprising:
The light intensity value in each region divided using the touch display screen calculates the first average value, and obtains described close
Second average value of the proximity values of sensor within a preset period of time;
According to first average value and the second average value, determine the top of the touch display screen with the presence or absence of shelter.
3. according to the method described in claim 2, it is characterized in that, described true according to first average value and the second average value
The top of the fixed touch display screen whether there is shelter, comprising:
Determine that bottom is made an uproar upper limit value using first average value;Wherein, when first average value is greater than or equal to preset light
When intensity threshold, the bottom make an uproar upper limit value be the first upper limit value, when first average value be less than the intensity threshold when, institute
It states bottom and makes an uproar upper limit value as the second upper limit value, first upper limit value is greater than second upper limit value;
When second average value makes an uproar upper limit value more than or equal to the bottom, determines that the top of the touch display screen exists and hide
Block material;
When second average value makes an uproar upper limit value less than the bottom, determines that the top of the touch display screen is not present and block
Object.
4. according to the method described in claim 2, it is characterized in that, the light intensity value according in described each region determines
The top of the touch display screen whether there is shelter, comprising:
From the light intensity value in described each region, largest light intensity angle value and minimum intensity of light angle value are chosen;
When the difference of the largest light intensity angle value and the minimum intensity of light angle value is greater than or equal to preset first threshold value, described in determination
There are shelters above touch display screen;
When the difference of the largest light intensity angle value and the minimum intensity of light angle value is less than preset first threshold value, determine that described touch shows
Shelter is not present in the top of display screen.
5. according to the method described in claim 2, it is characterized in that, the light intensity value according in described each region determines
The top of the touch display screen whether there is shelter, comprising:
Using the light intensity value in described each region, the variance yields of luminous intensity is calculated;
When the variance yields is greater than or equal to default second threshold, determine that there are shelters above the touch display screen;
When the variance yields is less than default second threshold, determine that shelter is not present in the top of the touch display screen.
6. according to claim 2 to 5 any one the method, which is characterized in that described to be approached to the proximity sensor
Threshold value carries out calibration
The corresponding relationship between preset light intensity value and preset correction value is searched using the first average value, using with described first
There is average value the correction value of corresponding relationship to be modified to the second average value, make an uproar value using revised value the bottom of as, and described the
One average value is the average value of the light intensity value in each region, and second average value is proximity values in preset time period
Average value;
It is made an uproar value calibrating close to threshold value to the proximity sensor according to the bottom.
7. according to the method described in claim 6, it is characterized in that, described make an uproar value to the proximity sensor according to the bottom
It is calibrated close to threshold value, comprising:
Obtain the default setting parameter of the proximity sensor, the default setting parameter includes: that initial bottom is made an uproar and value and initially connect
Nearly threshold value;
Determine that bottom value of making an uproar makes an uproar that perhaps decreasing value according to the increment value or subtracts for the increment value of value relative to the initial bottom
Small value is initially calibrated close to threshold value to described, after being calibrated close to threshold value.
8. a kind of calibrating installation of proximity sensor, which is characterized in that described device is applied to electronic equipment, the electronic equipment
Touch display screen below be provided with proximity sensor and ambient light sensor, described device includes:
Module is obtained, for obtaining what the environment photosensitive sensors detected when the electronic equipment is in breath screen state
Light intensity value;
Determining module, for determining the top of the touch display screen with the presence or absence of shelter according to the light intensity value;
Calibration module, for being approached to the proximity sensor when shelter is not present in the top of the touch display screen
Threshold value is calibrated.
9. a kind of electronic equipment, including the proximity sensor being set to below touch display screen and ambient light sensor, storage
Device, processor and it is stored in the computer program run on the memory and on the processor, which is characterized in that described
When processor executes the computer program, the calibration side of proximity sensor as claimed in any one of claims 1 to 7 is realized
Each step in method.
10. a kind of storage medium, is stored thereon with computer program, which is characterized in that the computer program is held by processor
When row, each step in the calibration method of proximity sensor as claimed in any one of claims 1 to 7 is realized.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910068695.XA CN109738004B (en) | 2019-01-24 | 2019-01-24 | Method and device for calibrating proximity sensor, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910068695.XA CN109738004B (en) | 2019-01-24 | 2019-01-24 | Method and device for calibrating proximity sensor, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109738004A true CN109738004A (en) | 2019-05-10 |
CN109738004B CN109738004B (en) | 2021-02-26 |
Family
ID=66366007
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910068695.XA Active CN109738004B (en) | 2019-01-24 | 2019-01-24 | Method and device for calibrating proximity sensor, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109738004B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110471068A (en) * | 2019-07-23 | 2019-11-19 | 维沃移动通信有限公司 | Proximity test method and mobile terminal |
CN110609977A (en) * | 2019-08-06 | 2019-12-24 | 深圳市万普拉斯科技有限公司 | Bottom noise adjusting processing method and device based on proximity sensor and computer equipment |
CN111366939A (en) * | 2020-02-20 | 2020-07-03 | Oppo(重庆)智能科技有限公司 | Calibration method and device of distance sensor, terminal and storage medium |
CN113267785A (en) * | 2020-02-17 | 2021-08-17 | 北京小米移动软件有限公司 | Distance detection method and device and electronic equipment |
CN113447064A (en) * | 2021-06-30 | 2021-09-28 | 东莞市小精灵教育软件有限公司 | Calibration method and electronic equipment |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4254331A (en) * | 1979-01-26 | 1981-03-03 | Mechanical Technology Incorporated | Calibration circuit for fiber optic proximity instrument |
US5300787A (en) * | 1992-02-11 | 1994-04-05 | Bst Servo-Technik Gmbh | Method for setting a sensor which detects the edge of a moving web of material in a contact-free manner |
US7623230B2 (en) * | 2007-10-23 | 2009-11-24 | Nokia Corporation | Optical sensor calibration |
CN102319056A (en) * | 2011-07-22 | 2012-01-18 | 深圳市理邦精密仪器股份有限公司 | Automatic calibration method and device for printing of patient monitor |
CN102440063A (en) * | 2008-12-29 | 2012-05-02 | 摩托罗拉移动公司 | Portable electronic device having self-calibrating proximity sensors |
CN103353621A (en) * | 2013-06-14 | 2013-10-16 | 广东欧珀移动通信有限公司 | Method for calibrating proximity sensor of mobile terminal, and mobile terminal |
CN103685661A (en) * | 2013-12-20 | 2014-03-26 | 上海斐讯数据通信技术有限公司 | Automatic calibration system and automatic calibration method for range sensor in mobile terminal product production line |
CN104407399A (en) * | 2014-12-02 | 2015-03-11 | 三星半导体(中国)研究开发有限公司 | Method for calibrating proximity sensor in portable terminal |
CN106210227A (en) * | 2016-07-06 | 2016-12-07 | 广东欧珀移动通信有限公司 | The calibration steps of a kind of infrared proximity transducer, device and mobile terminal |
CN109101099A (en) * | 2018-07-17 | 2018-12-28 | Oppo广东移动通信有限公司 | Prevent method, storage medium and the electronic equipment of proximity state exception |
-
2019
- 2019-01-24 CN CN201910068695.XA patent/CN109738004B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4254331A (en) * | 1979-01-26 | 1981-03-03 | Mechanical Technology Incorporated | Calibration circuit for fiber optic proximity instrument |
US5300787A (en) * | 1992-02-11 | 1994-04-05 | Bst Servo-Technik Gmbh | Method for setting a sensor which detects the edge of a moving web of material in a contact-free manner |
US7623230B2 (en) * | 2007-10-23 | 2009-11-24 | Nokia Corporation | Optical sensor calibration |
CN102440063A (en) * | 2008-12-29 | 2012-05-02 | 摩托罗拉移动公司 | Portable electronic device having self-calibrating proximity sensors |
CN102319056A (en) * | 2011-07-22 | 2012-01-18 | 深圳市理邦精密仪器股份有限公司 | Automatic calibration method and device for printing of patient monitor |
CN103353621A (en) * | 2013-06-14 | 2013-10-16 | 广东欧珀移动通信有限公司 | Method for calibrating proximity sensor of mobile terminal, and mobile terminal |
CN103685661A (en) * | 2013-12-20 | 2014-03-26 | 上海斐讯数据通信技术有限公司 | Automatic calibration system and automatic calibration method for range sensor in mobile terminal product production line |
CN104407399A (en) * | 2014-12-02 | 2015-03-11 | 三星半导体(中国)研究开发有限公司 | Method for calibrating proximity sensor in portable terminal |
CN106210227A (en) * | 2016-07-06 | 2016-12-07 | 广东欧珀移动通信有限公司 | The calibration steps of a kind of infrared proximity transducer, device and mobile terminal |
CN109101099A (en) * | 2018-07-17 | 2018-12-28 | Oppo广东移动通信有限公司 | Prevent method, storage medium and the electronic equipment of proximity state exception |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110471068A (en) * | 2019-07-23 | 2019-11-19 | 维沃移动通信有限公司 | Proximity test method and mobile terminal |
CN110471068B (en) * | 2019-07-23 | 2021-09-14 | 维沃移动通信有限公司 | Proximity detection method and mobile terminal |
CN110609977A (en) * | 2019-08-06 | 2019-12-24 | 深圳市万普拉斯科技有限公司 | Bottom noise adjusting processing method and device based on proximity sensor and computer equipment |
CN110609977B (en) * | 2019-08-06 | 2023-08-11 | 深圳市万普拉斯科技有限公司 | Bottom noise adjusting and processing method and device based on proximity sensor and computer equipment |
CN113267785A (en) * | 2020-02-17 | 2021-08-17 | 北京小米移动软件有限公司 | Distance detection method and device and electronic equipment |
CN113267785B (en) * | 2020-02-17 | 2023-10-13 | 北京小米移动软件有限公司 | Distance detection method and device and electronic equipment |
CN111366939A (en) * | 2020-02-20 | 2020-07-03 | Oppo(重庆)智能科技有限公司 | Calibration method and device of distance sensor, terminal and storage medium |
CN113447064A (en) * | 2021-06-30 | 2021-09-28 | 东莞市小精灵教育软件有限公司 | Calibration method and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN109738004B (en) | 2021-02-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109738004A (en) | The calibration method and device, electronic equipment and storage medium of proximity sensor | |
CN109840032A (en) | The calibration method and device, electronic equipment and storage medium of proximity sensor | |
CN107943345B (en) | Method and device for calibrating proximity sensor, storage medium and electronic equipment | |
US11429276B2 (en) | Method for displaying graphical user interface and mobile terminal | |
CN106055364B (en) | Application starting method and terminal equipment | |
CN107942306B (en) | Method and device for calibrating proximity sensor, storage medium and electronic equipment | |
EP3435199B1 (en) | Method, mobile terminal and non-transitory computer-readable storage medium for adjusting scanning frequency of touch screen | |
CN107504994B (en) | Calibration method, device, mobile terminal and the readable storage medium storing program for executing of proximity sensor | |
CN106331320B (en) | Control the method and device of screen state | |
CN108279408B (en) | Proximity sensor calibration method and device, mobile terminal and computer readable medium | |
CN105866781B (en) | Data processing method and electronic equipment | |
CN107290802A (en) | Proximity transducer calibration method, proximity transducer calibrating installation and intelligent terminal | |
CN112150962B (en) | Chip clock frequency adjusting method and device, chip and electronic equipment | |
CN109753425B (en) | Popup window processing method and device | |
CN107251536A (en) | A kind of mobile terminal shows the method and mobile terminal of multiple application widgets | |
CN107450029B (en) | Battery state checking method and device, computer equipment and computer readable storage medium | |
CN105549895B (en) | Application control method and mobile terminal | |
CN106851012A (en) | Proximity test method, device and terminal | |
CN108923865A (en) | Calibration method, device, mobile terminal and the storage medium of infrared distance sensor | |
CN109104521B (en) | Method and device for correcting approaching state, mobile terminal and storage medium | |
CN110830127B (en) | Radio frequency parameter processing method and device, mobile terminal and storage medium | |
US20140285177A1 (en) | Mobile current measurement equipment, current measurement terminal and current measurement method | |
CN112199246B (en) | Terminal test method and device, storage medium and mobile terminal | |
CN111857431B (en) | Information display method, touch control equipment and storage medium | |
CN111045737B (en) | Equipment identifier acquisition method, device, terminal equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |