CN107896274B - Infrared emitter control method, terminal and computer readable storage medium - Google Patents

Infrared emitter control method, terminal and computer readable storage medium Download PDF

Info

Publication number
CN107896274B
CN107896274B CN201711019885.XA CN201711019885A CN107896274B CN 107896274 B CN107896274 B CN 107896274B CN 201711019885 A CN201711019885 A CN 201711019885A CN 107896274 B CN107896274 B CN 107896274B
Authority
CN
China
Prior art keywords
terminal
infrared
infrared emitter
mode
determining
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.)
Active
Application number
CN201711019885.XA
Other languages
Chinese (zh)
Other versions
CN107896274A (en
Inventor
吴安平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201711019885.XA priority Critical patent/CN107896274B/en
Publication of CN107896274A publication Critical patent/CN107896274A/en
Application granted granted Critical
Publication of CN107896274B publication Critical patent/CN107896274B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C23/00Non-electrical signal transmission systems, e.g. optical systems
    • G08C23/04Non-electrical signal transmission systems, e.g. optical systems using light waves, e.g. infrared

Abstract

The invention discloses an infrared emitter control method, a terminal and a computer readable storage medium, wherein the method is applied to the terminal with a proximity function and a structure light shooting function and comprises the following steps: determining the current use state of the terminal; determining a target emission mode of a first infrared emitter according to the current use state of the terminal; and controlling the first infrared emitter to emit infrared light according to the target emission mode. Therefore, the approach function and the structure light photographing function are realized by using the same infrared transmitter, the occupied space of the infrared transmitter is reduced, the manufacturing cost of the terminal is saved, the structure of the terminal is simplified, and the user experience is improved.

Description

Infrared emitter control method, terminal and computer readable storage medium
Technical Field
The invention relates to the technical field of mobile terminals, in particular to an infrared emitter control method, a terminal and a computer readable storage medium.
Background
With the rapid development of network and electronic technology, the functions of terminals such as smart phones, tablet computers, portable personal computers and the like are increasingly powerful, and the terminal is widely applied to life, study and work of people. For example, the terminal may have an approach function of detecting approach or departure of a human body, a photographing function, a supplementary lighting function, a payment function, and the like.
Meanwhile, in order to better satisfy the user experience, the terminal gradually develops towards miniaturization, which causes a contradiction between the increasing functional requirements and the miniaturization requirements of the terminal.
Disclosure of Invention
The present invention aims to solve at least one of the above-mentioned technical problems to a certain extent.
Therefore, the method for controlling the infrared emitter realizes the approaching function and the structural light photographing function by using the same infrared emitter, reduces the occupied space of the infrared emitter, saves the manufacturing cost of the terminal, simplifies the structure of the terminal and improves the user experience.
The application also provides a terminal.
The present application also provides a computer-readable storage medium.
The first aspect of the present application provides an infrared emitter control method, which is applied to a terminal having an approaching function and a structured light photographing function, and includes:
determining the current use state of the terminal;
determining a target emission mode of a first infrared emitter according to the current use state of the terminal;
and controlling the first infrared emitter to emit infrared light according to the target emission mode.
According to the infrared emitter control method, after the current use state of the terminal is determined, the infrared emitter is controlled to emit infrared light according to the target emission mode corresponding to the current use state of the terminal, the approaching function and the structural light photographing function are achieved by the same infrared emitter, the occupied space of the infrared emitter is reduced, the manufacturing cost of the terminal is saved, the structure of the terminal is simplified, and the user experience is improved.
A second aspect of the present application provides a terminal, including a memory, a processor, and an infrared emitter;
the memory for storing executable program code;
the infrared transmitter is used for transmitting infrared light;
the processor implements the infrared emitter control method according to the first aspect by reading executable program code stored in the memory.
The terminal provided by the embodiment of the application controls the infrared transmitter to transmit infrared light according to the target transmitting mode corresponding to the current using state of the terminal, achieves the effect that the approaching function and the structural light photographing function are achieved by using the same infrared transmitter, reduces the occupied space of the infrared transmitter, saves the manufacturing cost of the terminal, simplifies the structure of the terminal, and improves user experience.
A third aspect of the present application proposes a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the infrared emitter control method according to the first aspect.
The computer-readable storage medium provided by the embodiment of the application can be arranged in any terminal with an approaching function and a structural light photographing function, and by executing the infrared emitter control method stored in the terminal, the approaching function and the structural light photographing function can be realized by using the same infrared emitter, so that the occupied space of the infrared emitter is reduced, the manufacturing cost of the terminal is saved, the structure of the terminal is simplified, and the user experience is improved.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a flow chart of an infrared emitter control method according to one embodiment of the present application;
FIG. 2 is a flow chart of a method of controlling an infrared emitter according to another embodiment of the present application;
fig. 3 is a block diagram of a terminal according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
An infrared transmitter control method, a terminal, and a computer-readable storage medium according to embodiments of the present invention are described below with reference to the accompanying drawings.
It can be understood that, with the rapid development of network and electronic technology, the terminal has increasingly powerful functions, for example, the terminal may have an approaching function for detecting approaching or leaving of a human body, a photographing function, a light supplementing function, a payment function, and the like, and the terminal gradually develops towards miniaturization, which causes a contradiction between the increasing functional requirements and the miniaturization requirements of the terminal.
In order to solve the above problems, embodiments of the present invention provide an ir emitter control method that combines a structured light ir emitter and an approach function ir emitter in the prior art into one ir emitter, so as to implement an approach function and a structured light photographing function using the same ir emitter, reduce the occupied space of the ir emitter, save the manufacturing cost of the terminal, simplify the structure of the terminal, and improve the user experience.
The method for controlling the infrared emitter according to the embodiment of the present application will be described with reference to fig. 1.
Fig. 1 is a flowchart of an infrared emitter control method according to an embodiment of the present application.
As shown in fig. 1, the method is applied to a terminal having a proximity function and a structured light photographing function, and includes:
step 101, determining the current use state of the terminal.
The infrared emitter control method provided by the embodiment of the invention can be configured in any terminal with a proximity function and a structure light shooting function to be executed. The types of the terminals are many, and can be selected according to application requirements, for example: mobile phones, computers, etc.
The using state can be a photographing state of the front camera, a photographing state of the non-front camera, and the like.
It should be noted that the photographing state in the embodiment of the present invention refers to a state in which a camera of the terminal is turned on; and the non-photographing state refers to a state that a camera of the terminal is closed.
And 102, determining a target emission mode of the first infrared emitter according to the current use state of the terminal.
The emission pattern may include an emission frequency, an emission angle, an emitted speckle number, an operating current and/or an operating voltage, and the like of the first infrared emitter.
And 103, controlling the first infrared emitter to emit infrared light according to the target emission mode.
It will be appreciated that the structural light imaging function and the proximity function have different requirements on the emission power of the infrared emitter. The structure light photographing function requires that the infrared emitter emits infrared light with higher emission power, for example, the infrared emitter is required to emit infrared light with larger working current or larger working voltage; the proximity function only needs the infrared emitter to emit infrared light with a low emission power, for example, the infrared emitter emits infrared light with a low operating current or a low operating voltage. Therefore, in the embodiment of the present invention, in order to implement the structured light photographing function and the proximity function by using the same infrared emitter, a first infrared emitter may be provided in the terminal, and the first infrared emitter is controlled to emit infrared light in different emission modes, thereby implementing different functions. Wherein the different transmission modes correspond to different transmission powers.
Specifically, when the terminal is in a different use state, the functions that the terminal needs to implement are different, for example, when the terminal is in a photographing state, the terminal needs to implement a structured light photographing function; in the non-photographing mode, the structure light photographing function is not required to be realized, and only the approaching function is required to be realized. Therefore, according to the use state of the terminal, the transmission mode for transmitting the infrared light can be determined, so that the corresponding functions can be realized under different use states.
During specific implementation, the corresponding relation between the use state of the terminal and the emission mode of the first infrared emitter can be preset, so that after the current use state of the terminal is determined, the target emission mode of the first infrared emitter corresponding to the current use state of the terminal can be determined according to the preset corresponding relation, and the first infrared emitter is controlled to emit infrared light according to the target emission mode.
The transmission modes of the first infrared transmitters corresponding to the terminal in different use states can be determined according to functions required to be realized by the terminal in different use states.
It should be noted that, when the infrared light emitted by the first infrared emitter is speckle, since the emission power of the first infrared emitter is related to the emission frequency, the number of emitted speckles, the operating current, and the operating voltage of the first infrared emitter, the target emission pattern of the first infrared emitter can be determined by determining the emission frequency, the number of emitted speckles, the operating current, and/or the operating voltage of the first infrared emitter. That is, step 102 of determining a target emission pattern of the first infrared emitter may include:
an emission frequency, an amount of emitted speckle, an operating current, and/or an operating voltage of the first infrared emitter is determined.
For example, when the usage state of the terminal is a photographing state, the terminal needs to implement a structure light photographing function, and the structure light photographing function requires the infrared emitter to emit infrared light at a higher emission power, so that the first infrared emitter can emit infrared light at a higher emission power by setting the emission frequency, the number of emitted speckles, the working current and/or the working voltage of the first infrared emitter. And when the user state of terminal was the non-state of shooing, owing to only need realize the proximity function, and the proximity function only need infrared emitter with lower transmit power transmission infrared light can, then can be through setting up the transmitting frequency of first infrared emitter, the speckle quantity of transmission, operating current and/or operating voltage, make first infrared emitter with lower transmit power transmission infrared light.
It should be noted that, due to the proximity function of the terminal, it is usually detected that an external object is far from the touch screen of the terminal, and therefore, the first infrared emitter in the embodiment of the present invention may be disposed below the touch screen on the front of the terminal.
During specific implementation, when the using state of the terminal is the photographing state of the front-facing camera, the corresponding transmitting mode is the first mode, and when the using state of the terminal is the photographing state of the non-front-facing camera, the corresponding transmitting mode is the second mode. Correspondingly, step 102 determines a target emission pattern of the first infrared emitter, including:
and if the current use state of the terminal is the photographing state of the front camera, determining that the first infrared transmitter transmits infrared light in a first mode.
And if the current use state of the terminal is the non-prepositive camera shooting state, determining that the first infrared transmitter transmits infrared light in a second mode.
The first mode is a mode with higher transmission power, and the second mode is a mode with lower transmission power.
Specifically, the current use state of the terminal can be determined to be a photographing state or a non-photographing state according to whether the terminal receives a camera opening instruction.
The camera opening instruction may be a voice instruction of a user, such as a user saying "i want to take a picture" to the terminal, or may be an instruction triggered by a user through a touch operation such as clicking, long-pressing, or sliding, which is not limited herein.
During specific implementation, if the terminal receives a camera opening instruction, the current use state of the terminal can be determined to be a photographing state, and if the camera opening instruction is not received or a camera closing instruction is received, the current use state of the terminal can be determined to be a non-photographing state.
Further, whether the front camera takes a picture or not can be determined according to a camera switching instruction received by the terminal.
Specifically, when the current use state of the terminal is determined to be the photographing state of the front camera, the first infrared transmitter can be controlled to transmit infrared light in a first mode so as to realize the structure light photographing function of the terminal; when the current use state of the terminal is determined to be the non-front camera shooting state, the first infrared transmitter can be controlled to transmit infrared light in the second mode, so that the approaching function of the terminal is realized.
It should be noted that, because the transmission power in the first mode is high, when the current usage state of the terminal is the front camera shooting mode, if the first infrared transmitter always transmits infrared light in the first mode, power consumption is large. In the embodiment of the invention, in order to reduce power loss, the first infrared emitter can be set to alternately emit infrared light in the first mode and the second mode in sequence. That is, step 102 may include:
and if the current use state is the photographing state of the front camera, determining that the first infrared transmitter alternately transmits infrared light in a first mode and a second mode in sequence, wherein the first mode is different from the second mode.
Wherein the alternating frequency of the first mode and the second mode can be set according to requirements.
When the current use state of the terminal is the photographing state of the front camera, the first infrared transmitter is controlled to alternately transmit infrared light in the first mode and the second mode in sequence, the terminal is guaranteed to realize the structure light photographing function, and meanwhile, the power loss can be reduced.
Further, in order to avoid that when the current use state of the terminal is the front camera shooting state, the infrared light is alternately emitted in the first mode and the second mode in sequence, and the situation that the first infrared emitter just emits the infrared light in the second mode at the shooting time possibly occurs, so that the structural light photographing function cannot be normally used at the shooting time.
Or, in a possible implementation form, the first infrared transmitter may be controlled to transmit the infrared light in the first mode at the shooting time of the front camera, and transmit the infrared light in the second mode before and after the shooting time of the front camera, so as to reduce the power loss to the maximum extent.
That is, after determining that the first infrared emitter alternately emits infrared light in the first mode and the second mode in sequence, the method may further include:
when a photographing instruction is acquired, controlling the first emitter to emit infrared light in a first mode;
and after the image is acquired, controlling the first infrared transmitter to transmit infrared light in a second mode.
Wherein the transmission power of the second mode is less than the transmission power of the first mode.
According to the infrared emitter control method provided by the embodiment of the invention, after the current use state of the terminal is determined, the infrared emitter is controlled to emit infrared light according to the target emission mode corresponding to the current use state of the terminal, so that the approaching function and the structural light photographing function are realized by using the same infrared emitter, the occupied space of the infrared emitter is reduced, the manufacturing cost of the terminal is saved, the structure of the terminal is simplified, and the user experience is improved.
Through the analysis, when the current use state of the terminal is the photographing state of the front camera, the infrared light can be alternately emitted in the first mode or the first mode and the second mode in sequence by controlling the first infrared emitter, so that the structured light photographing function is realized. In practical application, when the current use state of the terminal is the front camera shooting state, the structure light shooting function and the approaching function can be simultaneously realized. The above will be described in detail with reference to fig. 2.
Fig. 2 is a flowchart of an infrared emitter control method according to another embodiment of the present invention.
As shown in fig. 2, a proximity sensor may be further included in the terminal, and the infrared emitter control method includes:
step 201, determining that the current use state of the terminal is a photographing state of a front camera.
Step 202, determining that the target emission mode of the first infrared emitter is a first mode according to the current use state of the terminal.
Step 203, controlling the first infrared emitter to emit infrared light in a first mode.
The detailed implementation process and principle of the steps 201-203 may refer to the detailed description of the above embodiments, which is not described herein again.
And step 204, determining the distance between the current user and the terminal according to the infrared light intensity acquired by the proximity sensor.
It can be understood that, when a user takes a picture with the front camera, after the first infrared emitter emits infrared light, a part of the infrared light will be reflected to the proximity sensor by the touch screen of the terminal, and another part of the infrared light will be reflected to the proximity sensor by the user through the touch screen of the terminal. The proximity sensor can determine the distance between the user and the terminal according to the acquired intensity of the infrared light reflected by the user.
Specifically, the intensity of infrared light acquired by the proximity sensor and the corresponding relationship between the distance between the user and the terminal may be preset according to the use environment of the terminal, so that after the proximity sensor acquires infrared light reflected by the user, the distance between the current user and the terminal may be determined according to the currently acquired intensity of infrared light.
Step 205, adjusting the first mode according to the distance.
Specifically, there is transmission loss in the process of emitting infrared light to the object, and the transmission loss is proportional to the distance, that is, when the distance between the current user and the terminal is short, the transmission loss of the infrared light is small. At this time, on the premise of ensuring the effect of the structured light photographing function, the power loss can be reduced by reducing the working voltage or the working current of the first infrared emitter, or reducing the number of emitted speckles, and the like, and appropriately reducing the emission power of the first mode.
Correspondingly, when the distance between the user and the terminal is long, the transmitting power of the first mode can be properly increased by increasing the working voltage or the working current of the first infrared transmitter, or increasing the number of emitted speckles, and the like, so as to ensure the effect of the structured light photographing function.
In addition, when the current use state of the terminal is the front camera shooting state, if the first infrared emitter is controlled to alternately emit infrared light in the first mode and the second mode, the distance between the current user and the terminal can be determined by using the proximity sensor, and the first mode and/or the second mode can be adjusted according to the distance. That is, step 202 and step 203 may be replaced with:
determining that the first infrared transmitter alternately transmits infrared light in a first mode and a second mode in sequence according to the current use state of the terminal;
and controlling the first infrared emitter to alternately emit infrared light in a first mode and a second mode in sequence.
It should be noted that, in a possible implementation form, a second infrared transmitter may be further disposed in the terminal, so that the terminal has a light supplement function.
Specifically, whether the second infrared transmitter is started or not can be determined according to the current use state of the terminal and the current ambient light intensity of the terminal, so that the light supplement function of the terminal is realized.
In specific implementation, when the current use state of the terminal is a front camera shooting state and the current ambient light intensity is smaller than a threshold value, the second infrared transmitter can be started at the moment as light supplement is needed; in other cases, the second infrared emitter is not activated.
That is, the method for controlling an infrared emitter according to an embodiment of the present invention may further include:
and when the current use state of the terminal is the photographing state of the front camera and the current intensity of the ambient light is less than the threshold value, starting the second infrared transmitter.
Wherein the threshold value can be set as required.
It should be noted that, there is transmission loss in the light during the propagation process, and the transmission loss is proportional to the distance, that is, when the distance between the current user and the terminal is long, the transmission loss of the light is large. Therefore, when the distance between the terminal and the object to be shot is long, the light supplementing effect can be ensured by increasing the working voltage or the working current of the second infrared transmitter, or increasing the number of emitted speckles and the like in a mode of properly increasing the emission power of the first mode.
Further, when the distance between the terminal and the object to be shot is close, because the infrared ray that the light filling was used is small angle area light source, and when the distance is close, small angle area light source probably can only cover by a small part of the object to be shot, and can't realize the light filling on a relatively large scale, consequently in order to guarantee the light filling effect, can increase second infrared emitter's luminous angle.
That is, a proximity sensor may be further included in the terminal, and after the second infrared emitter is activated, the method may further include:
determining the distance between the current user and the terminal according to the infrared light intensity acquired by the proximity sensor;
and adjusting the emission mode of the second infrared emitter according to the distance.
Specifically, the proximity sensor may be configured to acquire only infrared light reflected by the user after being transmitted by the first infrared transmitter, or only infrared light reflected by the user after being transmitted by the second infrared transmitter, or acquire infrared light reflected by the user after being transmitted by the first infrared transmitter and the second infrared transmitter simultaneously, as required. And according to the using environment of the terminal, the corresponding relation between the infrared light intensity and the distance between the user and the terminal when the proximity sensor acquires the infrared light emitted by the first infrared emitter, the infrared light intensity and the distance between the user and the terminal are preset, so that after the proximity sensor acquires the infrared light reflected by the user, the distance between the current user and the terminal can be determined according to the currently acquired infrared light intensity, and then the emitting power of the second infrared emitter is adjusted according to the distance.
According to the infrared emitter control method provided by the embodiment of the invention, when the current use state of the terminal is determined to be the photographing state of the front camera, infrared light is emitted according to the first mode corresponding to the current use state of the terminal, and then the distance between the current user and the terminal is determined according to the infrared light intensity obtained by the proximity sensor, so that the first mode is adjusted according to the distance. The method and the device have the advantages that the approaching function and the structural light photographing function are realized by using the same infrared transmitter, the occupied space of the infrared transmitter is reduced, the manufacturing cost of the terminal is saved, the structure of the terminal is simplified, and the user experience is improved.
In another aspect, an embodiment of the present invention further provides a terminal.
Fig. 3 is a block diagram of a terminal according to an embodiment of the present application.
The types of the terminals are many, and can be selected according to application requirements, for example: mobile phones, computers, etc. Fig. 3 is a schematic diagram of a terminal as a mobile phone.
As shown in fig. 3, the terminal includes: a processor 31, a memory 32, and an infrared emitter 33.
Wherein the memory 32 is used for storing executable program code; the infrared emitter 33 is for emitting infrared light; the processor 31 implements the infrared emitter control method as in the foregoing embodiment by reading the executable program code stored in the memory 32.
Specifically, the infrared emitter may be an open structure or an unopened structure, which is not limited herein.
In one possible implementation, when the infrared emitter 33 is an open-cell structure, the terminal may further include a proximity sensor having an open-cell structure, and the edge of the infrared emitter 33 is spaced from the center of the proximity sensor by more than 2 mm.
The infrared emitter 33 having the opening structure is formed by coating an infrared ink that blocks visible light and ultraviolet rays by allowing infrared rays to pass through on a touch screen on the upper portion of the infrared emitter 33, and the receiver having the opening structure is formed by coating an infrared ink that blocks visible light and ultraviolet rays by allowing infrared rays to pass through on a filter of the proximity sensor.
It can be understood that, a part of the infrared light emitted by the infrared emitter 33 will be reflected by the touch screen of the terminal and acquired by the proximity sensor, and another part will penetrate through the touch screen of the terminal, and when an external object approaches the touch screen, a part of the infrared light penetrating through the touch screen will be reflected by the external object to the proximity sensor. The proximity sensor can determine the distance between an external object and the terminal mainly by detecting infrared light reflected by the outside.
Because infrared emitter 33 and proximity sensor are open pore structure, therefore only a very little part of the infrared light that infrared emitter 33 transmitted can be reflected by the touch-sensitive screen of terminal, and the touch-sensitive screen of terminal can be seen through to most to proximity sensor can accurately confirm the distance of external object and terminal through detecting the infrared light that is reflected back by external object. In this case, the distance between the infrared emitter 33 and the proximity sensor does not greatly affect the distance measurement by the proximity sensor, and therefore, the distance between the infrared emitter 33 and the proximity sensor can be set as needed.
In the embodiment of the present invention, the distance between the infrared emitter 33 and the proximity sensor may be set to be small, for example, the distance between the edge of the infrared emitter 33 and the center of the proximity sensor is greater than 2 mm, so as to reduce the occupied space between the infrared emitter 33 and the proximity sensor.
In another possible implementation form, when the infrared emitter 33 has an unopened structure, a proximity sensor having an unopened structure may be included in the terminal.
The edge of the infrared emitter 33 is spaced more than 7 mm from the center of the proximity sensor.
The non-opening structure of the infrared emitter 33 refers to white ink or other ink capable of blocking infrared rays coated on a touch screen on the upper part of the infrared emitter 33, and the non-opening structure of the receiver refers to white ink or other ink capable of blocking infrared rays coated on a filter of the proximity sensor.
Because infrared emitter 33 and proximity sensor are not trompil structure, therefore infrared light that infrared emitter 33 launched most can be reflected by the touch-sensitive screen of terminal, and only a small part can see through the touch-sensitive screen of terminal, and the infrared light that proximity sensor acquireed is the infrared light that is mostly reflected by the touch-sensitive screen of terminal to proximity sensor can't be through detecting the infrared light that is reflected back by external object, the accurate distance of confirming external object and terminal.
In the embodiment of the present invention, in order to improve the accuracy of the proximity sensor in determining the distance between the external object and the terminal, the distance between the infrared emitter 33 and the proximity sensor may be slightly larger, for example, the distance between the edge of the infrared emitter 33 and the center of the proximity sensor is greater than 7 mm, so that the infrared light reflected by the touch screen of the terminal received by the proximity sensor is less, and the influence of the infrared light reflected by the touch screen of the terminal on the distance measurement of the proximity sensor is reduced.
It should be noted that the proximity sensor provided in the embodiment of the present invention may be an infrared proximity sensor separately provided, or may be a two-in-one sensor made of an infrared proximity sensor and a light-sensitive sensor together, which is not limited herein.
In addition, the description of the method for controlling the infrared emitter in the foregoing embodiment is also applicable to the terminal in the embodiment of the present invention, and is not repeated here.
The terminal provided by the embodiment of the application controls the infrared transmitter to transmit infrared light according to the target transmitting mode corresponding to the current using state of the terminal, achieves the effect that the approaching function and the structural light photographing function are achieved by using the same infrared transmitter, reduces the occupied space of the infrared transmitter, saves the manufacturing cost of the terminal, simplifies the structure of the terminal, and improves user experience.
An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the infrared emitter control method as in the foregoing embodiments.
The computer-readable storage medium provided by the embodiment of the application can be arranged in any terminal with an approaching function and a structural light photographing function, and by executing the infrared emitter control method stored in the terminal, the approaching function and the structural light photographing function can be realized by using the same infrared emitter, so that the occupied space of the infrared emitter is reduced, the manufacturing cost of the terminal is saved, the structure of the terminal is simplified, and the user experience is improved.
The embodiments of the present application also provide a computer program product, and when instructions in the computer program product are executed by a processor, the method for controlling an infrared emitter as in the foregoing embodiments is performed.
The computer program product provided by the embodiment of the application can be arranged in any terminal with the approaching function and the structural light photographing function, and can realize the approaching function and the structural light photographing function by utilizing the same infrared transmitter by executing the program corresponding to the infrared transmitter control method, so that the occupied space of the infrared transmitter is reduced, the manufacturing cost of the terminal is saved, the structure of the terminal is simplified, and the user experience is improved.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It should be noted that in the description of the present specification, reference to the description of the term "one embodiment", "some embodiments", "an example", "a specific example", or "some examples", etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (10)

1. An infrared emitter control method is applied to a terminal with a proximity function and a structured light photographing function, and is characterized by comprising the following steps:
determining the current use state of the terminal;
determining a target emission mode of a first infrared emitter according to the current use state of the terminal, wherein different emission modes correspond to different emission powers;
the determining a target emission pattern of the first infrared emitter comprises:
if the current use state of the terminal is a front camera shooting state, determining that the first infrared transmitter alternately transmits infrared light in a first mode and a second mode in sequence, wherein the transmitting power of the first mode is greater than that of the second mode;
controlling the first infrared emitter to emit infrared light according to the target emission mode;
determining the distance between the current user and the terminal according to the infrared light intensity acquired by the proximity sensor;
and adjusting the first mode and/or the second mode according to the distance.
2. The method of claim 1, wherein said determining a target emission pattern of said first infrared emitter comprises:
determining an emission frequency, an amount of emitted speckle, an operating current, and/or an operating voltage of the first infrared emitter.
3. The method of claim 1, wherein after determining that the first infrared emitter alternately emits infrared light in a first pattern and a second pattern in sequence, further comprising:
when a photographing instruction is acquired, controlling the first infrared transmitter to transmit infrared light in a first mode;
after the image is acquired, controlling the first infrared transmitter to transmit infrared light in a second mode, wherein the transmission power of the second mode is smaller than that of the first mode.
4. The method of any of claims 1-3, wherein said determining a target emission pattern of said first infrared emitter comprises:
and if the current use state of the terminal is a non-front camera shooting state, determining that the first infrared transmitter transmits infrared light in a second mode.
5. The method according to any one of claims 1 to 3, wherein the terminal further has an infrared supplementary lighting function, and the method further comprises:
and starting a second infrared transmitter when the current use state of the terminal is determined to be a front camera shooting state and the current ambient light intensity is smaller than a threshold value.
6. The method of claim 5, wherein a proximity sensor is included in the terminal;
after the activating the second infrared emitter, the method further comprises:
determining the distance between the current user and the terminal according to the infrared light intensity acquired by the proximity sensor;
and adjusting the emission mode of the second infrared emitter according to the distance.
7. A terminal, comprising: the device comprises a memory, a processor, a proximity sensor and an infrared emitter;
the memory for storing executable program code;
the infrared transmitter is used for transmitting infrared light;
the processor implements the infrared emitter control method of any one of claims 1 to 6 by reading executable program code stored in the memory.
8. The terminal of claim 7, wherein the infrared emitter is an open cell structure and the proximity sensor is an open cell structure;
the edge of the infrared emitter is spaced from the center of the proximity sensor by more than 2 millimeters.
9. The terminal of claim 7, wherein the infrared emitter is an unapertured structure and the proximity sensor is an unapertured structure;
the edge of the infrared emitter is spaced more than 7 millimeters from the center of the proximity sensor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the infrared emitter control method according to any one of claims 1 to 6.
CN201711019885.XA 2017-10-27 2017-10-27 Infrared emitter control method, terminal and computer readable storage medium Active CN107896274B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711019885.XA CN107896274B (en) 2017-10-27 2017-10-27 Infrared emitter control method, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711019885.XA CN107896274B (en) 2017-10-27 2017-10-27 Infrared emitter control method, terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN107896274A CN107896274A (en) 2018-04-10
CN107896274B true CN107896274B (en) 2020-08-21

Family

ID=61802882

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711019885.XA Active CN107896274B (en) 2017-10-27 2017-10-27 Infrared emitter control method, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN107896274B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108600537A (en) * 2018-04-23 2018-09-28 Oppo广东移动通信有限公司 Proximity sensor, human body shadowing method, electronic device and readable storage medium storing program for executing
CN108918096B (en) * 2018-06-21 2019-11-29 维沃移动通信有限公司 A kind of detection method of infrared transmitter, mobile terminal
CN108989494B (en) * 2018-06-27 2021-02-09 北京小米移动软件有限公司 Electronic equipment
CN109451107B (en) * 2018-11-16 2021-09-03 Oppo广东移动通信有限公司 Electronic device
CN113810530A (en) * 2019-05-31 2021-12-17 Oppo广东移动通信有限公司 Control method of electronic device and electronic device
CN110213413B (en) 2019-05-31 2021-05-14 Oppo广东移动通信有限公司 Control method of electronic device and electronic device
CN112019660B (en) 2019-05-31 2021-07-30 Oppo广东移动通信有限公司 Control method of electronic device and electronic device
CN110266394B (en) * 2019-06-10 2021-08-31 Oppo广东移动通信有限公司 Adjusting method, terminal and computer readable storage medium
CN110335303B (en) * 2019-06-24 2021-10-26 Oppo广东移动通信有限公司 Image processing method and apparatus, and storage medium
CN112164213A (en) * 2020-09-04 2021-01-01 Oppo(重庆)智能科技有限公司 Remote control method, remote control device, storage medium and terminal
CN112399012B (en) * 2020-11-17 2022-03-25 惠州Tcl移动通信有限公司 Proximity sensor setting method, device and storage medium
CN113765590B (en) * 2021-09-07 2023-07-07 维沃移动通信有限公司 Infrared emission circuit, structure, control method, device and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103645595A (en) * 2013-11-05 2014-03-19 广东明创软件科技有限公司 Method for shooting light supplement based on mobile terminal and mobile terminal thereof
CN106303277A (en) * 2016-08-22 2017-01-04 深圳市金立通信设备有限公司 The parameter control method of light compensating lamp, terminal and self-shooting bar
CN106550072A (en) * 2016-12-06 2017-03-29 广东欧珀移动通信有限公司 Cover plate assembly and terminal

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101974582B1 (en) * 2012-09-06 2019-05-02 삼성전자주식회사 Infrared ray transmission large area shutter
CN103514437B (en) * 2012-12-24 2017-04-05 Tcl集团股份有限公司 A kind of three-dimension gesture identifying device and three-dimensional gesture recognition method
KR20150004989A (en) * 2013-07-03 2015-01-14 한국전자통신연구원 Apparatus for acquiring 3d image and image processing method using the same
CN104717348A (en) * 2013-12-13 2015-06-17 中兴通讯股份有限公司 Method, device and terminal for liquid crystal display backlight management
CN106161894A (en) * 2016-07-25 2016-11-23 维沃移动通信有限公司 A kind of mobile terminal and preparation method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103645595A (en) * 2013-11-05 2014-03-19 广东明创软件科技有限公司 Method for shooting light supplement based on mobile terminal and mobile terminal thereof
CN106303277A (en) * 2016-08-22 2017-01-04 深圳市金立通信设备有限公司 The parameter control method of light compensating lamp, terminal and self-shooting bar
CN106550072A (en) * 2016-12-06 2017-03-29 广东欧珀移动通信有限公司 Cover plate assembly and terminal

Also Published As

Publication number Publication date
CN107896274A (en) 2018-04-10

Similar Documents

Publication Publication Date Title
CN107896274B (en) Infrared emitter control method, terminal and computer readable storage medium
CN107862853B (en) Infrared emitter control method, terminal and computer readable storage medium
CN109410833B (en) Ambient light detection method, ambient light detection device, terminal and storage medium
CN109656317B (en) Apparatus having distance sensing function and distance sensing method
US20180315799A1 (en) Organic light emitting diode display module and control method thereof
EP3301551A1 (en) Terminal, method, apparatus and electronic device for identifying touch
CN106303023B (en) Screen state adjusting method and device
EP3828684B1 (en) Method and device for controlling switching of proximity-event detection elements
CN108509083A (en) Display panel and terminal
US11265406B2 (en) Electronic device
KR20190039588A (en) Projectors with non-contact control
CA2759720C (en) Reduced pre-flash for led flash based camera devices
CN108040213B (en) Method and apparatus for photographing image and computer-readable storage medium
JP2022078950A (en) Apparatus control method, apparatus control device, and storage medium
CN111599273B (en) Display screen control method and device, terminal equipment and storage medium
CN106161728B (en) Sensing device, electronic equipment and detection method
CN112672069A (en) Exposure method and apparatus
CN103837910A (en) Method for determining threshold value of proximity sensor and terminal
EP3851940A1 (en) Control method and device for home device and storage medium
CN112834031A (en) Electronic device and sensor control method
CN109151198B (en) Control method of proximity and light sensor, mobile terminal and storage medium
CN112702514B (en) Image acquisition method, device, equipment and storage medium
CN109510950A (en) Supplementary lighting sources control method, device, camera assembly, electronic equipment and medium
CN111246009B (en) Sliding cover type terminal, distance detection method and device and storage medium
CN114019486A (en) Laser radar parameter calibration device and laser radar

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
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant