CN108923865A - Calibration method, device, mobile terminal and the storage medium of infrared distance sensor - Google Patents
Calibration method, device, mobile terminal and the storage medium of infrared distance sensor Download PDFInfo
- Publication number
- CN108923865A CN108923865A CN201810737210.7A CN201810737210A CN108923865A CN 108923865 A CN108923865 A CN 108923865A CN 201810737210 A CN201810737210 A CN 201810737210A CN 108923865 A CN108923865 A CN 108923865A
- Authority
- CN
- China
- Prior art keywords
- infrared
- mobile terminal
- value
- calibration
- 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
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B17/00—Monitoring; Testing
- H04B17/10—Monitoring; Testing of transmitters
- H04B17/11—Monitoring; Testing of transmitters for calibration
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/24—Arrangements for testing
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Electromagnetism (AREA)
- Computer Networks & Wireless Communication (AREA)
- Optical Radar Systems And Details Thereof (AREA)
- Telephone Function (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
The embodiment of the present application provides calibration method, device, mobile terminal and the storage medium of a kind of infrared distance sensor.This method includes:The intensity reflected light values of removal environment optical crosstalk are obtained under non-talking state, intensity reflected light values refer to intensity value of the infrared ray of infrared distance sensor transmitting after reflection;When detecting that mobile terminal enters talking state, the first intensity value of the infrared ray in mobile terminal local environment is obtained;According to the first intensity value and intensity reflected light values;According to the distance threshold of crosstalk value calibration infrared distance sensor.In the embodiment of the present application, since the intensity reflected light values used when calculating crossfire value are obtained when mobile terminal is in non-talking state, without emitting infrared ray by infrared distance sensor when therefore being calibrated under talking state to the distance threshold of infrared distance sensor, to avoid the infrared ray of above-mentioned transmitting from interfering aerial signal, speech quality is promoted.
Description
Technical field
The invention relates to field of terminal technology, in particular to a kind of calibration method of infrared distance sensor, dress
It sets, mobile terminal and storage medium.
Background technique
Infrared distance sensor is the widely used sensor in mobile phone, measures mobile phone and obstacle by infrared ray
The distance between object, and then some controls are carried out to equipment state.For example, when mobile phone is on call, by it is infrared away from
The distance between mobile phone screen and front obstacle are measured from sensor, then compares the distance of measurement and distance threshold
Compared with controlling mobile phone according to comparison result and switch between screen state and bright screen state putting out.
When infrared distance sensor is in running order, first emit infrared ray, receives the reflection of the infrared ray of transmitting later
Light, and mobile phone and barrier are determined according to the comparison result of the intensity value of reflection light and the intensity value of the infrared ray of transmitting
The distance between.However in practical applications, there is also infrared rays in the environment as locating for mobile phone, and red under varying environment
The intensity value of outside line is different, thus at a distance from determining mobile phone between barrier before, need to eliminate the infrared ray in environment
Interference to measurement result, it is therefore desirable to which the distance threshold for sensor of adjusting the distance is calibrated.
In the related technology, mobile terminal usually carries out school to the distance threshold of infrared distance sensor under talking state
It is quasi-.Detailed process is as follows:Infrared emission LED (Light when mobile terminal is on call, in range sensor
Emitting Diode, light emitting diode) lamp transmitting infrared ray, the receiving part of range sensor receives above-mentioned transmitting at this time
Infrared ray reflection light and the infrared ray in environment light, mobile terminal determine the intensity of the above-mentioned infrared ray received,
The corresponding school of the intensity of the above-mentioned infrared ray received is determined according to the corresponding relationship between the intensity of infrared ray and distance later
The sum of distance threshold before calibrated distance and calibration is determined as the distance threshold after calibration by quasi- distance later.
In the related technology, due to calibrated distance sensor during can emit infrared ray, infrared ray can be to aerial signal
It interferes, and then influences speech quality.
Summary of the invention
The embodiment of the present application provides calibration method, device, mobile terminal and the storage medium of a kind of infrared distance sensor.
The technical solution is as follows:
On the one hand, the embodiment of the present application provides the calibration method of infrared distance sensor, the method includes:
The intensity reflected light values of removal environment optical crosstalk are obtained under non-talking state, the intensity reflected light values refer to red
Intensity value of the outer infrared ray apart from sensor emission after reflection;
When detecting that mobile terminal enters talking state, of the infrared ray in the mobile terminal local environment is obtained
One intensity value;
According to first intensity value and the intensity reflected light values;
According to the distance threshold of infrared distance sensor described in the crosstalk value calibration, the distance threshold is used for described
The switching of the equipment state of mobile terminal is controlled.
On the other hand, the embodiment of the present application provides a kind of calibrating installation of infrared distance sensor, and described device includes:
First obtains module, described for obtaining the intensity reflected light values of removal environment optical crosstalk under non-talking state
Intensity reflected light values refer to intensity value of the infrared ray of infrared distance sensor transmitting after reflection;
Second obtains module, for when detecting that mobile terminal enters talking state, obtaining locating for the mobile terminal
First intensity value of the infrared ray in environment;
First computing module, for calculating crossfire value according to first intensity value and the intensity reflected light values;
Threshold calibration module, it is described for the distance threshold of the infrared distance sensor according to the crosstalk value calibration
Distance threshold is used to control the switching of the equipment state of the mobile terminal.
In another aspect, the embodiment of the present application provides mobile kind of a terminal, the mobile terminal includes processor and memory,
The memory is stored with computer program, and the computer program is loaded by the processor and executed to realize above-mentioned aspect
The calibration method of the infrared distance sensor.
Another aspect, the embodiment of the present application provide a kind of computer readable storage medium, the computer-readable storage medium
Computer program is stored in matter, the computer program is loaded as processor and executed infrared described in above-mentioned aspect to realize
The calibration method of range sensor.
Technical solution provided by the embodiments of the present application can be brought the following benefits:
It is on call in mobile terminal by obtaining intensity reflected light values when mobile terminal is in non-talking state
When crossfire value calculated according to the first intensity value for obtaining in real time and above-mentioned intensity reflected light values, and according to crossfire value to infrared distance
The distance threshold of sensor is calibrated, since intensity reflected light values are obtained in advance under non-talking state, logical
Without emitting infrared ray by infrared distance sensor when being calibrated under speech phase to the distance threshold of infrared distance sensor, to keep away
The infrared ray for exempting from above-mentioned transmitting interferes aerial signal, promotes speech quality.
Detailed description of the invention
Fig. 1 is the schematic diagram of the working principle of the infrared distance sensor shown in the application one embodiment;
Fig. 2 is the flow chart of the calibration method of the infrared distance sensor shown in the application one embodiment;
Fig. 3 is the flow chart of the acquisition intensity reflected light values shown in the application one embodiment;
Fig. 4 is the flow chart for the calibration method of infrared distance sensor that the application another implementation exemplifies;
Fig. 5 is the block diagram of the calibrating installation of the infrared distance sensor shown in the application one embodiment;
Fig. 6 is the schematic diagram of the terminal shown in the application one embodiment.
Specific embodiment
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with attached drawing to the application embodiment party
Formula is described in further detail.
Technical solution provided by the embodiments of the present application, by obtaining reflective light intensity when mobile terminal is in non-talking state
Angle value is calculated according to the first intensity value and above-mentioned intensity reflected light values that obtain in real time when mobile terminal is on call and is gone here and there
Value is disturbed, and is calibrated according to distance threshold of the crossfire value to infrared distance sensor, since intensity reflected light values are non-through
Without by infrared when obtaining under speech phase, therefore being calibrated under talking state to the distance threshold of infrared distance sensor in advance
Range sensor emits infrared ray, so that the infrared ray of above-mentioned transmitting be avoided to interfere aerial signal, promotes speech quality.
The executing subject of technical solution provided by the embodiments of the present application, each step can be mobile terminal.Mobile terminal can
To be the electronic equipments such as mobile phone, tablet computer, E-book reader, multimedia play equipment, wearable device.
In the embodiment of the present application, mobile terminal is equipped with infrared distance sensor.Infrared distance sensor can be set
On the front panel of mobile terminal, the embodiment of the present application is not construed as limiting the position of infrared distance sensor in the terminal.
Infrared distance sensor is for measuring the distance between barrier and mobile terminal, so that mobile terminal being capable of root
Come accordingly to change operating parameter according to the distance measured.Illustratively, when mobile terminal is on call, infrared distance is passed
Sensor measures the distance between face and mobile terminal, and when the distance measured is less than first threshold, mobile terminal is switched to
Put out screen state;When the distance measured is greater than second threshold, mobile terminal switches to bright screen state.Wherein, first threshold is small
In second threshold.
Optionally, infrared distance sensor includes emission element and receiving part.Emission element is for emitting infrared ray.It connects
It receives component and is used for receiving infrared-ray.When encountering the distance difference of barrier due to infrared signal, reflected intensity is also different, therefore,
Infrared distance sensor measures barrier according to the intensity value of the intensity value of the infrared ray received and the infrared ray of transmitting
The distance between mobile terminal.In addition, it is necessary to illustrate, the emission element in infrared sensor can be same with receiving part
When work, work when can also be different.
In conjunction with reference Fig. 1, mobile terminal 10 is equipped with infrared distance sensor 11, and infrared distance sensor 11 includes emission part
Part 111 and receiving part 112, when infrared distance sensor 11 works, emission element 111 launches outward infrared ray, emission element
It when 111 infrared rays emitted encounter barrier 12, is reflected by barrier 12, it is anti-that receiving part 112 can receive barrier 12
The infrared ray penetrated, the intensity value and receiving part 112 of the infrared ray that infrared distance sensor 11 emits according to emission element 111
The intensity value of the infrared ray received determines the distance between mobile terminal 10 and barrier 12.
Referring to FIG. 2, it illustrates the streams of the calibration method of the infrared distance sensor of the application one embodiment offer
Cheng Tu.This method may include the following steps.
Step 201, the intensity reflected light values of removal environment optical crosstalk are obtained under non-talking state.
Intensity reflected light values refer to intensity value of the infrared ray of infrared distance sensor transmitting after reflection.Infrared distance
Sensor is when launching outward infrared ray, after encountering barrier when the infrared ray of transmitting is propagated outward, can be reflected by barrier,
In, by the intensity value of the reflected infrared ray of barrier.
Step 202, when detecting that mobile terminal enters talking state, the infrared ray in mobile terminal local environment is obtained
The first intensity value.
Talking state refers to that mobile terminal and other terminals are in the state of call.Optionally, mobile terminal passes through call
Monitoring method detects whether mobile terminal enters talking state.When mobile terminal monitors movement eventually by monitoring method of conversing
It holds to opposite end and issues call request, and when opposite end has received the call request or mobile terminal receives the call of opposite end and asks
When asking, and when mobile terminal has received the call request, mobile terminal enters talking state at this time.Above-mentioned call monitoring method can
To be Broadcast Receiver method.
It include infrared ray in the environment light of mobile terminal local environment, the receiving part of infrared distance sensor can receive
To the infrared ray in above-mentioned environment light.In the embodiment of the present application, it when mobile terminal is detected into talking state, opens red
The receiving part of outer range sensor receives the infrared ray in mobile terminal local environment, later by the infrared ray received
Intensity value is determined as the first intensity value.
Step 203, crossfire value is calculated in intensity reflected light values according to the first intensity value.
Crossfire value is used to determine calibrated distance when this sensor of adjusting the distance is calibrated.In the embodiment of the present application,
The sum of first intensity value and intensity reflected light values is determined as crossfire value.
Step 204, according to the distance threshold of crosstalk value calibration infrared distance sensor.
Distance threshold is used to control the switching of the equipment state of mobile terminal.Optionally, distance threshold refers to use
In triggering mobile terminal at a distance from putting out screen state between bright screen state and switching over.Illustratively, distance threshold includes connecing
Short distance threshold value and separate distance threshold.It is less than close to distance threshold far from distance threshold.When mobile terminal and barrier it
Between distance when being less than close to distance threshold, mobile terminal is switched to by bright screen state puts out screen state;When mobile terminal and obstacle
When the distance between object is greater than far from distance threshold, mobile terminal switches to bright screen state by putting out screen state.
Optionally, distance threshold refers to the distance that the touch screen functionality for triggering mobile terminal opens or closes.Touch screen function
User can be referred to by touching the screen of mobile terminal to realize the function with the interaction of mobile terminal.Illustratively, apart from threshold
Value includes close to distance threshold and far from distance threshold.It is less than close to distance threshold far from distance threshold.When mobile terminal with
When the distance between barrier is less than close to distance threshold, mobile terminal closes touch screen functionality;When mobile terminal and barrier it
Between distance when being greater than far from distance threshold, mobile terminal opens touch screen functionality.
In the embodiment of the present application, the distance threshold of infrared distance sensor is calibrated, to enable mobile terminal
It is enough that operating parameter is more accurately controlled according to infrared distance sensor realization, promote the working performance of mobile terminal.
In one possible implementation, step 204 may include following several sub-steps:
Step 204a determines the corresponding calibrated distance of crossfire value.
Step 204b, according to the distance threshold before the calibration of calibrated distance and infrared distance sensor, after calculating calibration
Distance threshold.
Step 204c, the distance threshold by the distance threshold before the calibration of infrared distance sensor, after being updated to calibration.
Optionally, there are mapping relations between crossfire value and calibrated distance.Optionally, crossfire value and calibrated distance exist just
Correlativity.That is, crossfire value is bigger, then calibrated distance is bigger;Crossfire value is smaller, then calibrated distance is smaller.Mobile terminal exists
After calculating above-mentioned crossfire value, above-mentioned mapping relations are searched to determine the corresponding calibrated distance of crossfire value.
Optionally, mobile terminal determines the sum of the distance threshold before the calibration of calibrated distance and infrared distance sensor
For the distance threshold after calibration.
In alternatively possible implementation, step 204 may include following several sub-steps:
Step 204d is handled crossfire value by range calibration model, after obtaining the corresponding calibration of crossfire value away from
From threshold value.
Step 204e, the distance threshold by the distance threshold before the calibration of infrared distance sensor, after being updated to calibration.
Range calibration model is to be obtained by sample crossfire value to neural metwork training, and sample crossfire value is corresponding with expection
Distance threshold after calibration.Further, range calibration model be using machine learning algorithm, and be corresponding with after calibration away from
What the sample crossfire value from threshold value obtained neural metwork training.
Machine learning algorithm can be back-propagation algorithm (Back-Propagation, BP), faster region convolution mind
Through network faster RCNN (faster Regions with Convolutional Neural Network, faster
RCNN) algorithm etc., the embodiment of the present application is not construed as limiting this.Neural network can be convolutional neural networks (Convolutional
Neural Network, CNN) artificial neural network (Artificial Neural Network, ANN) etc., the embodiment of the present application
This is not construed as limiting.
Optionally, range calibration model includes:One input layer, at least one hidden layer and an output layer.Input layer
Input data is crossfire value, and output layer exports the distance threshold the result is that after the corresponding calibration of the crossfire value.After determining calibration
Distance threshold process it is as follows:Crossfire value is input to the input layer of range calibration model, by the hidden layer of range calibration model
Feature extraction is carried out to features described above data, and the feature extracted is combined and is abstracted, it finally should by output layer output
Distance threshold after the corresponding calibration of crossfire value.In addition, in the embodiment of the present application, being not construed as limiting to the specific structure of hidden layer.
In general, the number of plies of neural network is more, and effect is better but the calculating time also can be longer, in practical applications, in combination with right
The requirement of the overtime rate of time-out time, designs the neural network of the appropriate number of plies.
The training process of range calibration model is as follows:Sample crossfire value is inputted to initial range calibration model, obtains sample
Distance threshold after the corresponding actual alignment of this crossfire value, by the distance threshold and sample after the corresponding actual alignment of sample crossfire value
Distance threshold after the corresponding expected calibration of this crossfire value is compared, and obtains calculating loss, if calculating loss is greater than preset value,
It is subsequent to repeat the above steps according to the parameter of each hidden layer of calculating loss adjusting, it is preset until calculating loss and being less than or equal to
Value, ultimately produces range calibration model.Above-mentioned preset value can be according to nicety of grading actual set, and the embodiment of the present application is to this
It is not construed as limiting.
In conclusion technical solution provided by the embodiments of the present application, by being obtained when mobile terminal is in non-talking state
Intensity reflected light values are taken, when mobile terminal is on call according to the first intensity value and above-mentioned reflective light intensity obtained in real time
Angle value calculates crossfire value, and is calibrated according to distance threshold of the crossfire value to infrared distance sensor, due to intensity of reflected light
Value is obtained in advance under non-talking state, therefore when calibrating under talking state to the distance threshold of infrared distance sensor
Without emitting infrared ray by infrared distance sensor, so that the infrared ray of above-mentioned transmitting be avoided to interfere aerial signal, mention
Rise speech quality.
In addition, being calibrated in communication process to infrared sensor, to enable mobile terminal according to infrared distance
Sensor realization more accurately controls operating parameter, promotes the working performance of mobile terminal.
It was introduced in foregoing embodiments, intensity reflected light values are obtained in the case where mobile terminal is in non-talking state,
The acquisition process of intensity reflected light values is explained below.The acquisition process comprises the following steps:
Step 301, it in the case where mobile terminal is in non-talking state, obtains infrared in mobile terminal local environment
Second intensity value of line;
In the embodiment of the present application, when mobile terminal is in non-talking state, connecing in infrared distance sensor is opened
Component is received to receive the infrared ray in environment locating for mobile terminal, the intensity value of the infrared ray received is being determined as second
Intensity value.
It should be noted that the first intensity value and the second intensity value are the mobile terminal that infrared distance sensor receives
The intensity value of infrared ray in local environment, but mobile terminal when opportunity due to receiving infrared-ray and receiving infrared-ray
Local environment have differences, therefore the first intensity value is identical as the second intensity value possibility, it is also possible to different.
Step 302, infrared acquisition process at least once is executed.
Infrared acquisition process refers to during emitting infrared ray by the emission element of infrared distance sensor, passes through
The process of the receiving part receiving infrared-ray of infrared distance sensor.During infrared acquisition, the hair of infrared distance sensor
It penetrates component and receiving part works at the same time.
The execution number of infrared acquisition process can also be set by terminal default setting by related development personnel are customized
Fixed, the embodiment of the present application is not construed as limiting the execution number of infrared acquisition process.
It should be noted that above-mentioned the second intensity value of acquisition and execute at least once infrared acquisition process institute every time need
It is less than preset duration, the error generated when to avoiding intensity reflected light values is excessive.
Step 303, the third intensity value for the infrared ray that receiving part receives during infrared acquisition is obtained.
Infrared ray received by the receiving part of infrared distance sensor had both included the infrared of mobile terminal local environment
Line, the part infrared ray that also emission element including infrared distance sensor emits, therefore third intensity value is typically larger than first
Intensity value, also greater than the second intensity value.
Third intensity value can be practical determining according to the execution number of infrared acquisition process.When the execution of infrared detection process
When number is one time, the intensity value for the infrared ray that receiving part during infrared acquisition receives directly is determined as by mobile terminal
Third intensity value.When the execution number of infrared detection process is n times namely the mobile terminal emission part that passes through range sensor
Part emits n times infrared ray, and receives n times infrared ray by the receiving part of range sensor, and mobile terminal will receive at this time
The average intensity value of n times infrared ray be determined as third intensity value, n is the integer greater than 1.
Step 304, according to the second intensity value and third intensity value, intensity reflected light values are calculated.
In the embodiment of the present application, by the difference between third intensity value and the second intensity value, it is determined as intensity of reflected light
Value.
Referring to Figure 4, the calibration method of the infrared distance sensor provided it illustrates the application one embodiment
Flow chart.This method may include the following steps.
Step 401, whether monitoring mobile terminal enters charged state.
Charged state refers to mobile terminal access charger and carries out the state of charging operations.Monitor mobile terminal whether into
Enter charged state, can be completed, can also be led to by mobile terminal by charging IC (integrated circuit, integrated circuit)
Overcharge monitoring method is completed.Above-mentioned charging monitoring method can be is Charging () method.
Step 402, it when monitoring that mobile terminal enters charged state, if mobile terminal is in non-talking state, obtains
Take the second intensity value of the infrared ray in mobile terminal local environment.
In the embodiment of the present application, it when monitoring that mobile terminal enters charged state and is in non-talking state, then holds
Row obtains the step of intensity reflected light values, since the frequency that mobile terminal enters charged state is higher, may be implemented to anti-
It penetrates light intensity value to update with carrying out high-frequency, subsequent calculating crossfire value is more accurate, to realize to infrared distance sensor more
Accurately calibrate.
When monitoring that mobile terminal does not enter charged state, if mobile terminal is not at non-talking state, do not execute
The step of obtaining the second intensity value of the infrared ray in mobile terminal local environment.
Step 403, infrared acquisition process at least once is executed.
Wherein, infrared acquisition process, which refers to the process of, is emitting infrared ray by the emission element of infrared distance sensor
In, pass through the process of the receiving part receiving infrared-ray of infrared distance sensor.
Step 404, the third intensity value for the infrared ray that receiving part receives during infrared acquisition is obtained.
Step 405, according to the second intensity value and third intensity value, intensity reflected light values are calculated.
Intensity reflected light values refer to intensity value of the infrared ray of infrared distance sensor transmitting after reflection.
Step 406, when detecting that mobile terminal enters talking state, the infrared ray in mobile terminal local environment is obtained
The first intensity value.
Step 407, according to the first intensity value and intensity reflected light values, crossfire value is calculated.
After intensity reflected light values refer to removal environment optical crosstalk, the reflection light of the infrared ray of infrared distance sensor transmitting
Intensity value.
Step 408, according to the distance threshold of crosstalk value calibration infrared distance sensor.
Distance threshold is used to control the switching of the equipment state of mobile terminal.
In conclusion technical solution provided by the embodiments of the present application, monitors that mobile terminal enters charged state by working as
And when being in non-talking state, then the step of obtaining intensity reflected light values is executed, since mobile terminal enters the frequency of charged state
Rate is higher, therefore may be implemented to update intensity reflected light values with carrying out high-frequency, and subsequent calculating crossfire value is more accurate, thus
Infrared distance sensor is more accurately calibrated in realization.
Following is the application Installation practice, can be used for executing the application embodiment of the method.It is real for the application device
Undisclosed details in example is applied, the application embodiment of the method is please referred to.
Referring to FIG. 5, it illustrates the frames of the calibrating installation of the infrared distance sensor of the application one embodiment offer
Figure.It, can also be corresponding soft by hardware execution with realizing that the exemplary function of the above method, the function can be by hardware realizations
Part is realized.The apparatus may include:First, which obtains module 501, second, obtains module 502, the first computing module 503 and threshold value school
Quasi-mode block 504.
First obtains module 501, for obtaining the intensity reflected light values of removal environment optical crosstalk, institute under non-talking state
It states intensity reflected light values and refers to intensity value of the infrared ray of infrared distance sensor transmitting after reflection.
Second obtains module 502, for when detecting that mobile terminal enters talking state, obtaining the mobile terminal institute
Locate the first intensity value of the infrared ray in environment.
First computing module 503, for calculating crossfire value according to first intensity value and the intensity reflected light values.
Threshold calibration module 504, for the distance threshold of the infrared distance sensor according to the crosstalk value calibration, institute
The switching that distance threshold is stated for the equipment state to the mobile terminal controls.
Technical solution provided by the embodiments of the present application, by obtaining reflective light intensity when mobile terminal is in non-talking state
Angle value is calculated according to the first intensity value and above-mentioned intensity reflected light values that obtain in real time when mobile terminal is on call and is gone here and there
Value is disturbed, and is calibrated according to distance threshold of the crossfire value to infrared distance sensor, since intensity reflected light values are non-through
Without by infrared when obtaining under speech phase, therefore being calibrated under talking state to the distance threshold of infrared distance sensor in advance
Range sensor emits infrared ray, so that the infrared ray of above-mentioned transmitting be avoided to interfere aerial signal, promotes speech quality.
In the alternative embodiment provided based on embodiment illustrated in fig. 5, described first obtains module 501, is used for:
In the case where the mobile terminal is in non-talking state, obtain infrared in the mobile terminal local environment
Second intensity value of line.
Execute infrared acquisition process at least once, wherein the infrared acquisition process refers to by the infrared distance
During the emission element transmitting infrared ray of sensor, pass through the receiving part receiving infrared-ray of the infrared distance sensor
Process.
Obtain the third intensity value for the infrared ray that the receiving part the receives during infrared acquisition.
According to second intensity value and the third intensity value, the intensity reflected light values are calculated.
Optionally, the infrared acquisition process executes n times, and the n is the integer greater than 1;Described first obtains module
501, the average intensity value of the infrared ray for receiving the receiving part during n times infrared acquisition determines
For the third intensity value.
Optionally, described device further includes:State monitoring module (not shown).
State monitoring module, for monitoring whether the mobile terminal enters charged state.
First obtains module 501, is also used to when monitoring that the mobile terminal enters the charged state, described in execution
The step of intensity reflected light values of removal environment optical crosstalk are obtained under non-talking state.
In the alternative embodiment provided based on embodiment illustrated in fig. 5, the threshold calibration module 504 is used for:
Determine the corresponding calibrated distance of the crossfire value;
According to the distance threshold before the calibration of the calibrated distance and the infrared distance sensor, after calculating calibration away from
From threshold value;
Distance threshold by the distance threshold before the calibration of the infrared distance sensor, after being updated to the calibration.
In the alternative embodiment provided based on embodiment illustrated in fig. 5, the threshold calibration module 504 is used for:
The crossfire value is handled by range calibration model, the distance after obtaining the corresponding calibration of the crossfire value
Threshold value, the range calibration model are to be obtained by sample crossfire value to neural metwork training, and the sample crossfire value is corresponding
Distance threshold after having calibration;
Distance threshold by the distance threshold before the calibration of the infrared distance sensor, after being updated to the calibration.
It should be noted that device provided by the above embodiment is when realizing its function, only with above-mentioned each functional module
It divides and carries out for example, can according to need in practical application and be completed by different functional modules above-mentioned function distribution,
The internal structure of equipment is divided into different functional modules, to complete all or part of the functions described above.In addition,
Apparatus and method embodiment provided by the above embodiment belongs to same design, and specific implementation process is detailed in embodiment of the method, this
In repeat no more.
With reference to Fig. 6, it illustrates the structural block diagrams for the mobile terminal that one exemplary embodiment of the application provides.This Shen
Please in terminal may include one or more such as lower component:Processor 610 and memory 620.
Processor 610 may include one or more processing core.Processor 610 utilizes various interfaces and connection
Various pieces in entire terminal, by running or executing the instruction being stored in memory 620, program, code set or instruction
Collection, and the data being stored in memory 620 are called, execute the various functions and processing data of terminal.Optionally, processor
610 can use Digital Signal Processing (Digital Signal Processing, DSP), field programmable gate array
(Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic
Array, PLA) at least one of example, in hardware realize.Processor 610 can integrating central processor (Central
Processing Unit, CPU) and one or more of modem etc. combination.Wherein, the main processing operation system of CPU
System and application program etc.;Modem is for handling wireless communication.It is understood that above-mentioned modem can not also
It is integrated into processor 610, is realized separately through chip piece.
Optionally, above-mentioned each embodiment of the method mentions under realizing when processor 610 executes the program instruction in memory 620
The calibration method of the infrared distance sensor of confession.
Memory 620 may include random access memory (Random Access Memory, RAM), also may include read-only
Memory (Read-Only Memory).Optionally, which includes non-transient computer-readable medium (non-
transitory computer-readable storage medium).Memory 620 can be used for store instruction, program, generation
Code, code set or instruction set.Memory 620 may include storing program area and storage data area, wherein storing program area can store
Instruction for realizing operating system, the instruction at least one function, for realizing the finger of above-mentioned each embodiment of the method
Enable etc.;Storage data area, which can be stored, uses created data etc. according to terminal.
The structure of above-mentioned terminal is only illustrative, and in actual implementation, terminal may include more or fewer components,
Such as:Infrared distance sensor etc., the present embodiment is not construed as limiting this.
It will be understood by those skilled in the art that the restriction of structure shown in Fig. 6 not structure paired terminal 600, can wrap
It includes than illustrating more or fewer components, perhaps combine certain components or is arranged using different components.
In the exemplary embodiment, a kind of computer readable storage medium, the computer-readable storage medium are additionally provided
Computer program is stored in matter, the computer program is loaded by the processor of terminal and executed to realize that the above method is implemented
Each step in example.
In the exemplary embodiment, a kind of computer program product is additionally provided, when the computer program product is performed
When, for realizing the function of each step in above method embodiment.
It should be understood that referenced herein " multiple " refer to two or more."and/or", description association
The incidence relation of object indicates may exist three kinds of relationships, for example, A and/or B, can indicate:Individualism A, exists simultaneously A
And B, individualism B these three situations.Character "/" typicallys represent the relationship that forward-backward correlation object is a kind of "or".
Above-mentioned the embodiment of the present application serial number is for illustration only, does not represent the advantages or disadvantages of the embodiments.
The foregoing is merely the exemplary embodiments of the application, all in spirit herein not to limit the application
Within principle, any modification, equivalent replacement, improvement and so on be should be included within the scope of protection of this application.
Claims (12)
1. a kind of calibration method of infrared distance sensor, which is characterized in that the method includes:
Under non-talking state obtain removal environment optical crosstalk intensity reflected light values, the intensity reflected light values refer to it is infrared away from
Intensity value of the infrared ray after reflection from sensor emission;
When detecting that mobile terminal enters talking state, the last the first of the infrared ray in the mobile terminal local environment is obtained
Angle value;
According to first intensity value and the intensity reflected light values;
According to the distance threshold of infrared distance sensor described in the crosstalk value calibration, the distance threshold is used for the movement
The switching of the equipment state of terminal is controlled.
2. the method according to claim 1, wherein described obtain removal environment optical crosstalk under non-talking state
Intensity reflected light values, including:
In the case where the mobile terminal is in the non-talking state, obtain infrared in the mobile terminal local environment
Second intensity value of line;
Execute infrared acquisition process at least once, wherein the infrared acquisition process refers to by the infrared Distance-sensing
During the emission element transmitting infrared ray of device, pass through the mistake of the receiving part receiving infrared-ray of the infrared distance sensor
Journey;
Obtain the third intensity value for the infrared ray that the receiving part the receives during infrared acquisition;
According to second intensity value and the third intensity value, the intensity reflected light values are calculated.
3. according to the method described in claim 2, the n is greater than 1 it is characterized in that, the infrared acquisition process executes n times
Integer;
The acquisition is during the infrared acquisition, the third intensity value for the infrared ray that the receiving part receives, including:
The average intensity value for the infrared ray that the receiving part is received during the n times infrared acquisition, is determined as institute
State third intensity value.
4. method according to any one of claims 1 to 3, which is characterized in that described to obtain removal under non-talking state
Before the intensity reflected light values of environment optical crosstalk, further include:
Monitor whether the mobile terminal enters charged state;
When monitoring that the mobile terminal enters the charged state, executes described obtain under non-talking state and remove environment
The step of intensity reflected light values of optical crosstalk.
5. method according to any one of claims 1 to 3, which is characterized in that described according to the crosstalk value calibration
The distance threshold of infrared distance sensor, including:
Determine the corresponding calibrated distance of the crossfire value;
According to the distance threshold before the calibration of the calibrated distance and the infrared distance sensor, after calculating calibration apart from threshold
Value;
Distance threshold by the distance threshold before the calibration of the infrared distance sensor, after being updated to the calibration.
6. method according to any one of claims 1 to 3, which is characterized in that described according to the crosstalk value calibration
The distance threshold of infrared distance sensor, including:
The crossfire value is handled by range calibration model, after obtaining the corresponding calibration of the crossfire value apart from threshold
Value, the range calibration model is to be obtained by sample crossfire value to neural metwork training, and the sample crossfire value is corresponding with
It is expected that the distance threshold after calibration;
Distance threshold by the distance threshold before the calibration of the infrared distance sensor, after being updated to the calibration.
7. a kind of calibrating installation of infrared distance sensor, which is characterized in that described device includes:
First obtains module, for obtaining the intensity reflected light values of removal environment optical crosstalk, the reflection under non-talking state
Light intensity value refers to intensity value of the infrared ray of infrared distance sensor transmitting after reflection;
Second obtains module, for when detecting that mobile terminal enters talking state, obtaining the mobile terminal local environment
In infrared ray the first intensity value;
First computing module, for calculating crossfire value according to first intensity value and the intensity reflected light values;
Threshold calibration module, for the distance threshold of the infrared distance sensor according to the crosstalk value calibration, the distance
Threshold value is used to control the switching of the equipment state of the mobile terminal.
8. device according to claim 7, which is characterized in that described first obtains module, is used for:
In the case where the mobile terminal is in non-talking state, the infrared ray in the mobile terminal local environment is obtained
Second intensity value;
Execute infrared acquisition process at least once, wherein the infrared acquisition process refers to by the infrared Distance-sensing
During the emission element transmitting infrared ray of device, pass through the mistake of the receiving part receiving infrared-ray of the infrared distance sensor
Journey;
Obtain the third intensity value for the infrared ray that the receiving part the receives during infrared acquisition;
According to second intensity value and the third intensity value, the crossfire value is calculated.
9. device according to claim 8, which is characterized in that it is described first obtain module, for by it is described it is infrared away from
Emission element from sensor emits n times infrared ray, and infrared by the receiving part of infrared distance sensor reception n times
The average intensity value of infrared ray described in the n times received is determined as the third intensity value by line, and the n is just whole greater than 1
Number.
10. device according to any one of claims 7 to 9, which is characterized in that described device further includes:
State detection module, for monitoring whether the mobile terminal enters charged state;
Described first obtains module, is also used to when monitoring that the mobile terminal enters the charged state, execute it is described
The step of intensity reflected light values of removal environment optical crosstalk are obtained under non-talking state.
11. a kind of mobile terminal, which is characterized in that the mobile terminal includes processor and memory, the memory storage
There is computer program, the computer program is loaded by the processor and executed to realize such as any one of claim 1 to 6 institute
The calibration method for the infrared distance sensor stated.
12. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium
Program, the computer program are loaded by processor and are executed to realize such as infrared distance as claimed in any one of claims 1 to 6
The calibration method of sensor.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810737210.7A CN108923865B (en) | 2018-07-06 | 2018-07-06 | Calibration method and device of infrared distance sensor, mobile terminal and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810737210.7A CN108923865B (en) | 2018-07-06 | 2018-07-06 | Calibration method and device of infrared distance sensor, mobile terminal and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN108923865A true CN108923865A (en) | 2018-11-30 |
| CN108923865B CN108923865B (en) | 2021-06-11 |
Family
ID=64425161
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810737210.7A Active CN108923865B (en) | 2018-07-06 | 2018-07-06 | Calibration method and device of infrared distance sensor, mobile terminal and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN108923865B (en) |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111366939A (en) * | 2020-02-20 | 2020-07-03 | Oppo(重庆)智能科技有限公司 | Calibration method and device of distance sensor, terminal and storage medium |
| CN112665168A (en) * | 2020-12-28 | 2021-04-16 | 佛山市顺德区美的电子科技有限公司 | Method and device for controlling working state of infrared sensor and storage medium |
| CN112665627A (en) * | 2020-12-24 | 2021-04-16 | 佛山市顺德区美的电子科技有限公司 | Method and device for calibrating infrared performance of air conditioner and storage medium |
| CN113119128A (en) * | 2021-04-25 | 2021-07-16 | 广州科语机器人有限公司 | Robot, operation control method thereof, electronic device, and storage medium |
| CN113411448A (en) * | 2021-06-16 | 2021-09-17 | 维沃移动通信有限公司 | Infrared signal processing method and device, electronic equipment and readable storage medium |
| CN113701714A (en) * | 2021-09-23 | 2021-11-26 | 深圳市微特精密科技股份有限公司 | Method and device for identifying flattening calibration of DUT (device under test) by infrared reflection sensor |
| WO2024014653A1 (en) * | 2022-07-15 | 2024-01-18 | 삼성전자 주식회사 | Electronic device and method for providing state information |
| CN118444291A (en) * | 2024-07-03 | 2024-08-06 | 荣耀终端有限公司 | Sensor calibration method and electronic equipment |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102265252A (en) * | 2011-06-24 | 2011-11-30 | 华为终端有限公司 | A method and device for adjusting the perception threshold of an infrared proximity sensor |
| CN102301684A (en) * | 2011-06-24 | 2011-12-28 | 华为终端有限公司 | Method and device through which a terminal determines approach of an object |
| CN102843469A (en) * | 2012-08-16 | 2012-12-26 | 广东欧珀移动通信有限公司 | Method for setting threshold of infrared proximity sensor and mobile terminal |
| WO2017199550A1 (en) * | 2016-05-17 | 2017-11-23 | シャープ株式会社 | Proximity sensor, proximity illumination intensity sensor, electronic device, and proximity sensor calibration method |
| CN107450817A (en) * | 2017-07-31 | 2017-12-08 | 广东欧珀移动通信有限公司 | Proximity test method, apparatus, storage medium and electronic equipment |
-
2018
- 2018-07-06 CN CN201810737210.7A patent/CN108923865B/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102265252A (en) * | 2011-06-24 | 2011-11-30 | 华为终端有限公司 | A method and device for adjusting the perception threshold of an infrared proximity sensor |
| CN102301684A (en) * | 2011-06-24 | 2011-12-28 | 华为终端有限公司 | Method and device through which a terminal determines approach of an object |
| CN102843469A (en) * | 2012-08-16 | 2012-12-26 | 广东欧珀移动通信有限公司 | Method for setting threshold of infrared proximity sensor and mobile terminal |
| WO2017199550A1 (en) * | 2016-05-17 | 2017-11-23 | シャープ株式会社 | Proximity sensor, proximity illumination intensity sensor, electronic device, and proximity sensor calibration method |
| CN107450817A (en) * | 2017-07-31 | 2017-12-08 | 广东欧珀移动通信有限公司 | Proximity test method, apparatus, storage medium and electronic equipment |
Cited By (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111366939A (en) * | 2020-02-20 | 2020-07-03 | Oppo(重庆)智能科技有限公司 | Calibration method and device of distance sensor, terminal and storage medium |
| CN112665627A (en) * | 2020-12-24 | 2021-04-16 | 佛山市顺德区美的电子科技有限公司 | Method and device for calibrating infrared performance of air conditioner and storage medium |
| CN112665627B (en) * | 2020-12-24 | 2023-10-10 | 佛山市顺德区美的电子科技有限公司 | Method, device and storage medium for calibrating infrared performance of air conditioner |
| CN112665168B (en) * | 2020-12-28 | 2022-04-12 | 佛山市顺德区美的电子科技有限公司 | Method and device for controlling working state of infrared sensor and storage medium |
| CN112665168A (en) * | 2020-12-28 | 2021-04-16 | 佛山市顺德区美的电子科技有限公司 | Method and device for controlling working state of infrared sensor and storage medium |
| CN113119128A (en) * | 2021-04-25 | 2021-07-16 | 广州科语机器人有限公司 | Robot, operation control method thereof, electronic device, and storage medium |
| CN113411448B (en) * | 2021-06-16 | 2022-06-24 | 维沃移动通信有限公司 | Infrared signal processing method and apparatus, electronic device and readable storage medium |
| CN113411448A (en) * | 2021-06-16 | 2021-09-17 | 维沃移动通信有限公司 | Infrared signal processing method and device, electronic equipment and readable storage medium |
| CN113701714A (en) * | 2021-09-23 | 2021-11-26 | 深圳市微特精密科技股份有限公司 | Method and device for identifying flattening calibration of DUT (device under test) by infrared reflection sensor |
| CN113701714B (en) * | 2021-09-23 | 2024-06-07 | 深圳市微特精密科技股份有限公司 | Method and device for identifying DUT (device under test) leveling calibration by infrared reflection sensor |
| WO2024014653A1 (en) * | 2022-07-15 | 2024-01-18 | 삼성전자 주식회사 | Electronic device and method for providing state information |
| CN118444291A (en) * | 2024-07-03 | 2024-08-06 | 荣耀终端有限公司 | Sensor calibration method and electronic equipment |
| CN118444291B (en) * | 2024-07-03 | 2024-11-22 | 荣耀终端有限公司 | Sensor calibration method and electronic device |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108923865B (en) | 2021-06-11 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108923865A (en) | Calibration method, device, mobile terminal and the storage medium of infrared distance sensor | |
| US12369207B2 (en) | Prompt information display method and apparatus and electronic device | |
| CN107290802B (en) | Proximity sensor calibration method, proximity sensor calibration device and intelligent terminal | |
| CN107942306B (en) | Method and device for calibrating proximity sensor, storage medium and electronic equipment | |
| CN109074216B (en) | A touch control method and device | |
| CN107450817B (en) | Proximity detection method, device, storage medium and electronic device | |
| CN107884764B (en) | Proximity detection method, device, storage medium and electronic device | |
| EP3623973A1 (en) | Unlocking control method and related product | |
| CN109059987A (en) | A kind of method, device and mobile terminal for calibrating optical sensor | |
| US20200084745A1 (en) | Method for processing radio frequency interference and electronic device | |
| CN106791120B (en) | Control method and device for screen-off of mobile terminal | |
| CN109212534B (en) | Method, device, equipment and storage medium for detecting holding gesture of mobile terminal | |
| WO2021129147A1 (en) | Proximity sensor anomaly detection method and apparatus and mobile terminal | |
| EP4443830A1 (en) | Ai model switching processing method and apparatus, and communication device | |
| CN113395084B (en) | Antenna switching method and device and electronic equipment | |
| CN108881875A (en) | Image white balance processing method and device, storage medium and terminal | |
| KR20150122476A (en) | Method and apparatus for controlling gesture sensor | |
| CN109379093A (en) | A kind of method, apparatus, circuit and the electronic equipment of adjustment signal frequency | |
| CN114791728B (en) | Electromagnetic compatibility testing method, device, equipment and medium based on vehicle-mounted controller | |
| CN110086987B (en) | Camera visual angle cutting method and device and storage medium | |
| CN109068000A (en) | Sensor control method, mobile terminal, and computer-readable storage medium | |
| CN109242782B (en) | Noise processing method and device | |
| CN109639370A (en) | Near-field communication aerial detection method, device, mobile terminal and storage medium | |
| US8150325B1 (en) | Blanking system | |
| US11821984B2 (en) | Proximity sensor based on ratio change detection |
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 |