CN107566750A - Control method, device and the storage medium of flash lamp - Google Patents
Control method, device and the storage medium of flash lamp Download PDFInfo
- Publication number
- CN107566750A CN107566750A CN201710914718.5A CN201710914718A CN107566750A CN 107566750 A CN107566750 A CN 107566750A CN 201710914718 A CN201710914718 A CN 201710914718A CN 107566750 A CN107566750 A CN 107566750A
- Authority
- CN
- China
- Prior art keywords
- camera
- preset
- shielded
- shielded state
- duration
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 238000001514 detection method Methods 0.000 claims description 13
- 238000005516 engineering process Methods 0.000 abstract description 8
- 238000004891 communication Methods 0.000 description 10
- 238000012545 processing Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 230000001133 acceleration Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 239000013589 supplement Substances 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02B—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
- Y02B20/00—Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
- Y02B20/40—Control techniques providing energy savings, e.g. smart controller or presence detection
Landscapes
- Studio Devices (AREA)
Abstract
The disclosure is directed to a kind of control method of flash lamp, device and storage medium, belong to field of terminal technology.Methods described includes:Detect the state that is blocked of camera;Judge whether the state that is blocked meets default unlocking condition;When the state of being blocked meets the default unlocking condition, flash lamp is opened.In this way, user can open conveniently by camera control flash lamp is blocked, so as to simplify the operation of user, the control efficiency to flash lamp is improved.
Description
Technical Field
The present disclosure relates to the field of terminal technologies, and in particular, to a method and an apparatus for controlling a flash lamp, and a storage medium.
Background
With the development of terminal technology, the functions of the terminal become more and more powerful. At present, a terminal is generally provided with a flash lamp, and a user can control the flash lamp according to actual needs. For example, the user can control the flash lamp to be turned on in the shooting process, and light is supplemented for the shooting environment by the flash lamp, or the flash lamp is controlled to be turned on when light is dark, and the flash lamp is used as a flashlight for lighting.
In the related art, a user generally needs to control the flash through a user interface. For example, when a user wants to turn on the flash lamp for illumination, the user needs to first turn on the display screen, then turn on the user interface including the flashlight option, and click the flashlight option, so as to control the flash lamp to turn on. Or, when a user wants to turn on the flash lamp to supplement light in the shooting process, the shooting setting interface needs to be turned on first, and then the flash lamp option is found and clicked in the shooting setting interface, so that the flash lamp can be controlled to be turned on.
Disclosure of Invention
In order to overcome the problems in the related art, the present disclosure provides a method and an apparatus for controlling a flash lamp, and a storage medium, wherein the technical scheme is as follows:
in a first aspect, a method for controlling a flash is provided, and is applied to a terminal, and the method includes:
detecting a shielded state of the camera;
judging whether the shielded state meets a preset starting condition or not;
and when the shielded state meets the preset starting condition, starting the flash lamp.
Optionally, the determining whether the shielded state meets a preset opening condition includes:
when the shielded state comprises the time length of the camera which is shielded and the shielded time length is greater than or equal to a first preset time length, determining that the shielded state meets the preset starting condition; and/or the presence of a gas in the gas,
when the shielded state comprises the continuous shielding times of the camera and the continuous shielding times are greater than or equal to the preset times, determining that the shielded state meets the preset starting condition; and/or the presence of a gas in the gas,
and when the shielded state comprises the interval duration of two continuous times of shielding of the camera and the interval duration is less than or equal to a second preset duration, determining that the shielded state meets the preset starting condition.
Optionally, after the flash is turned on, the method further includes:
when the camera is detected to be shielded, determining the shielding time length of the camera;
and when the determined duration is greater than or equal to a third preset duration, turning off the flash lamp.
Optionally, the detecting the blocked state of the camera includes:
detecting a shielded state of the camera through a photosensitive element of the camera; or,
the shielding state of the camera is detected through the light sensor, and the light sensor is located in the preset distance range of the camera.
Optionally, the camera is a front camera or a rear camera.
In a second aspect, there is provided a control device for a flash, which is applied in a terminal, the device including:
the detection module is used for detecting the shielded state of the camera;
the judging module is used for judging whether the shielded state meets a preset starting condition or not;
and the starting module is used for starting the flash lamp when the shielded state meets the preset starting condition.
Optionally, the determining module includes:
the first judgment submodule is used for determining that the shielded state meets the preset opening condition when the shielded state comprises the time length of shielding the camera and the shielded time length is greater than or equal to a first preset time length; and/or the presence of a gas in the gas,
the second judgment submodule is used for determining that the shielded state meets the preset starting condition when the shielded state comprises the continuous shielded times of the camera and the continuous shielded times are greater than or equal to the preset times; and/or the presence of a gas in the gas,
and the third judgment submodule is used for determining that the shielded state meets the preset opening condition when the shielded state comprises an interval duration of shielding the camera for two consecutive times, and the interval duration is less than or equal to a second preset duration.
Optionally, the apparatus further comprises:
the determining module is used for determining the duration of the shielding of the camera when the shielding of the camera is detected;
and the closing module is used for closing the flash lamp when the determined duration is greater than or equal to a third preset duration.
Optionally, the detection module includes:
the first detection submodule is used for detecting the shielded state of the camera through a photosensitive element of the camera; or,
and the second detection submodule is used for detecting the shielded state of the camera through a light sensor, and the light sensor is positioned in the preset distance range of the camera.
Optionally, the camera is a front camera or a rear camera.
In a third aspect, there is provided a control apparatus for a flash, the apparatus comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the steps of any of the methods of controlling a flash described in the first aspect above.
In a fourth aspect, a non-transitory computer readable storage medium is provided, the non-transitory computer readable storage medium having stored thereon instructions, wherein the instructions, when executed by a processor, implement the steps of any of the methods for controlling a flash described in the first aspect.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in the embodiment of the disclosure, the sheltered state of the camera can be detected, and the flash lamp is automatically turned on when the sheltered state of the camera meets the preset turning-on condition, so that the user can conveniently control the flash lamp to turn on by sheltering the camera, thereby simplifying the operation of the user and improving the control efficiency of the flash lamp.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow chart illustrating a method of controlling a flash according to an exemplary embodiment;
FIG. 2 is a flow chart illustrating another method of controlling a flash according to an exemplary embodiment;
FIG. 3A is a schematic diagram of a control device for a flashlight, according to an exemplary embodiment;
FIG. 3B is a block diagram illustrating a determination module 302 according to an exemplary embodiment;
FIG. 3C is a schematic diagram of another flash control apparatus according to an exemplary embodiment;
FIG. 3D is a schematic diagram illustrating a configuration of a detection module 301 according to an exemplary embodiment;
fig. 4 is a block diagram of a terminal 400 according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Before explaining the embodiments of the present disclosure in detail, an application scenario of the embodiments of the present disclosure will be explained.
In practical applications, a user may want to turn on a flash of a terminal so as to supplement light during a shooting process with the flash, or illuminate in a dark environment. In the related art, a user generally needs to control the flash lamp through a user interface, that is, the user needs to open the user interface and execute related operations in the user interface to control the flash lamp to be turned on, so that the user operation is cumbersome, and the control efficiency of the flash lamp is low. In the embodiment of the present disclosure, in order to simplify the operation of the user and improve the control efficiency of the flash, a method for controlling the flash by detecting the shielded state of the camera is provided, which is detailed as follows.
Fig. 1 is a flowchart illustrating a method for controlling a flash, which is applied to a terminal according to an exemplary embodiment, and includes the steps of:
in step 101, the shielded state of the camera is detected.
In step 102, it is determined whether the shielded state satisfies a preset opening condition.
In step 103, when the shielded state satisfies the preset turn-on condition, turning on a flash.
In the embodiment of the disclosure, the sheltered state of the camera can be detected, and the flash lamp is automatically turned on when the sheltered state of the camera meets the preset turning-on condition, so that the user can conveniently control the flash lamp to turn on by sheltering the camera, thereby simplifying the operation of the user and improving the control efficiency of the flash lamp.
Optionally, the determining whether the shielded state meets a preset opening condition includes:
when the shielded state comprises the time length of shielding the camera and the shielded time length is greater than or equal to a first preset time length, determining that the shielded state meets the preset opening condition; and/or the presence of a gas in the gas,
when the shielded state comprises the continuous shielded times of the camera and the continuous shielded times are more than or equal to the preset times, determining that the shielded state meets the preset starting condition; and/or the presence of a gas in the gas,
and when the shielded state comprises the interval duration of the camera being shielded for two times continuously and the interval duration is less than or equal to a second preset duration, determining that the shielded state meets the preset starting condition.
Optionally, after the flash is turned on, the method further includes:
when the camera is detected to be shielded, determining the shielding time length of the camera;
and when the determined time length is greater than or equal to a third preset time length, turning off the flash lamp.
Optionally, the detecting the blocked state of the camera includes:
detecting the shielded state of the camera through a photosensitive element of the camera; or,
the sheltered state of the camera is detected through the light sensor, and the light sensor is located within the preset distance range of the camera.
Optionally, the camera is a front camera or a rear camera.
All the above optional technical solutions can be combined arbitrarily to form optional embodiments of the present disclosure, and the embodiments of the present disclosure are not described in detail again.
Fig. 2 is a flowchart illustrating another flash control method according to an exemplary embodiment, which is applied to a terminal, as shown in fig. 2, and includes the steps of:
in step 201, the occluded state of the camera is detected.
In the process that a user uses the terminal, the terminal can automatically detect the shielding state of the configured camera, so that the flash lamp is controlled to be turned on or off according to the shielding state of the camera, and the control efficiency is improved.
The camera may be a front camera or a rear camera, which is not limited in the embodiments of the present disclosure.
The sheltered state of the camera may include a duration of sheltering the camera, a number of times that the camera is sheltered continuously, or an interval duration of sheltering the camera twice continuously, and the like, and may also include sheltered states in other forms, which is not limited in the embodiment of the present disclosure.
In practical application, detecting the shielded state of the camera may include the following two implementation manners:
in a first implementation, the shielded state of the camera is detected by a photosensitive element of the camera.
The camera can detect incident light through the configured photosensitive element, and whether the camera is sheltered or not is judged through the detected light. For example, it may be determined that the camera is occluded when the currently detected light intensity decreases by a preset threshold relative to the last detected light intensity or there is suddenly no incident light, or by other light conditions.
The second implementation mode is that the light sensor detects the sheltered state of the camera, and the light sensor is located in the preset distance range of the camera.
The light sensor is called as a brightness sensor and comprises a light projector and a light receiver, and the light sensor can detect the light brightness of the environment where the terminal is located. The embodiment of the disclosure summarizes, the sheltered state of the light sensor can be determined according to the light brightness detected by the light sensor, and then the sheltered state of the camera located in the preset distance range of the light sensor is determined according to the sheltered state of the light sensor.
The preset distance range can be set by a terminal in a default mode, and is a range which can be covered by a palm of a user, so that the shielded state of the camera is determined through the shielded state of the light sensor. Moreover, most terminals are equipped with a light sensor, and the light sensor is usually located within a preset distance range of the camera, i.e. located near the camera. For example, the light sensor is typically located on the right side of the front camera. In the disclosed embodiments.
In step 202, it is determined whether the blocked state satisfies a preset opening condition.
The preset starting condition is a condition which is required to be met by the shielding state of the preset camera, and when the terminal detects that the shielding state meets the preset starting condition, the flash lamp can be automatically started. Moreover, the preset starting condition may be set by a default of the terminal, or may be flexibly set by the user, which is not limited in the embodiment of the present disclosure. For example, the preset turn-on condition may be a preset continuous shielding duration, a preset continuous shielding number, a preset shielding interval duration, or the like of the camera.
Wherein, should judge whether should be sheltered from the state and satisfy preset opening condition can include following several kinds of modes:
the first implementation mode comprises the following steps: when the shielded state comprises the time length of shielding the camera and the shielded time length is greater than or equal to the first preset time length, determining that the shielded state meets the preset opening condition.
The first preset duration may be set by a default of the terminal, or may be set by the user according to actual needs, which is not limited in the embodiment of the present disclosure. For example, the first preset time period may be 2s, 3s, 5s, or the like.
The terminal can start timing when detecting that the camera is shielded, so that the duration of shielding the camera is determined, whether the shielded duration is greater than or equal to the first preset duration is judged, and when the shielded duration is greater than or equal to the first preset duration, the shielded state can be determined to meet the preset opening condition.
For example, if the first preset duration is 3s, when the duration of the camera being blocked is greater than or equal to 3s, it may be determined that the blocked state of the camera satisfies the preset opening condition.
The second implementation mode comprises the following steps: and when the shielded state comprises the continuous shielded times of the camera and the continuous shielded times are more than or equal to the preset times, determining that the shielded state meets the preset opening condition.
The preset times may be set by default by the terminal, or may be set by the user according to actual needs, which is not limited in the embodiments of the present disclosure. For example, the preset number of times may be 2 times, 3 times, 5 times, or the like.
The terminal can accumulate the continuous shielded times of the camera when detecting that the camera is shielded every time, judge whether the accumulated continuous shielded times is greater than or equal to the preset times, and determine that the shielded state meets the preset opening condition when the accumulated continuous shielded times is greater than or equal to the preset times.
For example, if the first preset duration is 3 times, when it is detected that the camera is continuously shielded for 3 times, it may be determined that the shielded state of the camera satisfies the preset turn-on condition.
The third implementation mode comprises the following steps: and when the shielded state comprises the interval duration of the camera being shielded for two times continuously and the interval duration is less than or equal to the second preset duration, determining that the shielded state meets the preset opening condition.
The second preset duration may be set by a default of the terminal, or may be set by the user according to actual needs, which is not limited in the embodiment of the present disclosure. For example, the second preset time period may be 1s, 2s, 3s, or the like.
The terminal can calculate the interval duration between the shielding and the last shielding when detecting that the camera is shielded every time, and judge whether the interval duration is less than or equal to the second preset duration, and when the interval duration is less than or equal to the second preset duration, it can be determined that the shielded state meets the preset opening condition.
For example, if the first preset duration is 1s, when it is detected that the duration of the interval between two consecutive times of shielding of the camera is less than or equal to 1s, it may be determined that the shielded state of the camera satisfies the preset turn-on condition.
And a fourth implementation manner, in combination with any two or 3 of the three implementation manners, of judging whether the shielded state of the camera meets the preset starting condition.
That is, the terminal may determine whether the shielded state of the camera satisfies the preset turn-on condition by combining any two or 3 conditions of the shielded duration, the shielded times and the interval duration.
For example, the terminal may determine that the shielded state of the camera satisfies the preset opening condition when the terminal satisfies any two or 3 of a duration that the camera is shielded is greater than or equal to the first preset duration, a number of times that the camera is continuously shielded is greater than or equal to the preset number of times, and an interval duration that the camera is continuously shielded twice is less than or equal to the second preset duration.
Taking the example of judging whether the shielded state of the camera meets the preset opening condition by combining the shielded times and the interval duration, the terminal can determine that the shielded state of the camera meets the preset opening condition when the continuous shielded times of the camera are greater than or equal to the preset times and the interval duration of any two continuous shielded times in the continuous shielded times is less than or equal to the second preset duration.
For example, if the preset number of times is 3 times and the second preset duration is 1s, the terminal may determine that the blocked state of the camera satisfies the preset opening condition when detecting that the camera is blocked for 3 consecutive times and the time interval between any two consecutive blocked times is less than 1 s.
In step 203, when the shielded state satisfies the preset turn-on condition, a flash is turned on.
When the terminal determines that the shielded state meets the preset starting condition, the flash lamp can be automatically started, so that a user does not need to open a user interface and execute related operations in the user interface, and does not need to execute any key operation, the flash lamp can be quickly started and stopped only by shielding the camera, the operation mode is simple and quick, the user operation is simplified, and the control efficiency is improved. Moreover, the mode of quickly starting the flash lamp by shielding the camera is carried out in a cool manner, and the user experience is improved.
For example, the user can use the camera to shoot the in-process, when feel that the current shooting environment is more to need to mend light, shelter from the camera 3 times fast with the palm and open the flash light to the quick opening of flash off lamp has been realized.
In addition, after the flash is turned on, the flash needs to be turned off when the user no longer needs the flash, and in order to avoid the user needing to turn off the flash through the complicated operation of the user interface, the embodiment of the present disclosure further improves a manner of rapidly turning off the flash, which is shown in step 204 and 205 described below.
In step 204, when it is detected that the camera is occluded, a duration of time that the camera is occluded is determined.
That is, in the process of using the flash after the flash is turned on, the terminal may further continue to detect whether the camera is shielded, and when it is detected that the camera is shielded, the duration of the shielding of the camera may be determined. For example, the terminal may start a timer to start timing when it is detected that the camera is shielded, and stop timing when it is detected that the camera is no longer shielded, so as to determine the duration of shielding the camera by timing.
In step 205, the flash is turned off when the determined duration is greater than or equal to a third preset duration.
The third preset time period may be set by the terminal, or may be set by the user according to actual needs, which is not limited in the embodiment of the present disclosure. For example, the third preset time period may be 4s, 5s, 10s, or the like.
That is, after the flash lamp is started, when the shielded duration of the camera is determined to be greater than or equal to the third preset duration, the flash lamp can be automatically turned off so as to avoid the electric quantity consumption of the flash lamp, and the control mode is simple and quick, so that the control efficiency and the user experience are improved.
For example, in practical application, after the flash lamp is turned on, when the terminal is placed in a pocket for a long time or the camera is placed on a desktop downwards, the camera is always in a shielding state, and the flash lamp can be automatically turned off at the moment, so that power consumption trouble cannot be caused to a user.
It should be noted that, in the embodiment of the present disclosure, the flash lamp is only turned off automatically when the duration of the camera being shielded is longer than a certain duration, and in practical applications, the flash lamp may also be turned off in other shielded states of the camera.
For example, the flash may be turned off when the number of times of continuous shielding of the camera is greater than or equal to a preset number of times, and the preset number of times is different from the preset number of times for turning on the flash. For example, the flash lamp may be turned on when the number of consecutive blocked times of the camera is greater than or equal to a first preset number, and turned off when the number of consecutive blocked times of the camera is greater than or equal to a second preset number, where the first preset number is different from the second preset number, for example, the first preset number is smaller than the second preset number.
In the embodiment of the disclosure, the sheltered state of the camera can be detected, and the flash lamp is automatically turned on when the sheltered state of the camera meets the preset turning-on condition, so that the user can conveniently control the flash lamp to turn on by sheltering the camera, thereby simplifying the operation of the user and improving the control efficiency of the flash lamp.
Fig. 3A is a schematic structural diagram illustrating a control device for a flash according to an exemplary embodiment, where the control device may be a mobile phone, a tablet computer, or the like. Referring to fig. 3A, the apparatus includes:
the detection module 301 is used for detecting the shielded state of the camera;
a judging module 302, configured to judge whether the shielded state meets a preset starting condition;
the starting module 303 is configured to start the flash lamp when the shielded state meets the preset starting condition.
Optionally, referring to fig. 3B, the determining module 302 includes:
a first determining submodule 3021, configured to determine that the blocked state satisfies the preset opening condition when the blocked state includes a duration that the camera is blocked and the blocked duration is greater than or equal to a first preset duration; and/or the presence of a gas in the gas,
a second determining submodule 3022, configured to determine that the blocked state satisfies the preset opening condition when the blocked state includes a number of times that the camera is continuously blocked, and the number of times that the camera is continuously blocked is greater than or equal to a preset number of times; and/or the presence of a gas in the gas,
the third determining submodule 3023 is configured to determine that the blocked state meets the preset opening condition when the blocked state includes an interval duration during which the camera is blocked twice continuously, and the interval duration is less than or equal to a second preset duration.
Optionally, referring to fig. 3C, the apparatus further includes:
a determining module 304, configured to determine, when it is detected that the camera is blocked, a duration of the camera being blocked;
a turn-off module 305 for turning off the flash when the determined duration is greater than or equal to a third preset duration.
Optionally, referring to fig. 3D, the detection module 301 includes:
the first detection submodule 3011 is configured to detect, through a photosensitive element of the camera, a blocked state of the camera; or,
the second detection submodule 2012 is configured to detect a blocked state of the camera through a light sensor, where the light sensor is located within a preset distance range of the camera.
Optionally, the camera is a front camera or a rear camera.
In the embodiment of the disclosure, the sheltered state of the camera can be detected, and the flash lamp is automatically turned on when the sheltered state of the camera meets the preset turning-on condition, so that the user can conveniently control the flash lamp to turn on by sheltering the camera, thereby simplifying the operation of the user and improving the control efficiency of the flash lamp.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 4 is a block diagram of a terminal 400 according to an example embodiment. For example, the apparatus 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 4, the apparatus 400 may include one or more of the following components: processing components 402, memory 404, power components 406, multimedia components 408, audio components 410, input/output (I/O) interfaces 412, sensor components 414, and communication components 416.
The processing component 402 generally controls overall operation of the apparatus 400, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 402 can include one or more modules that facilitate interaction between the processing component 402 and other components. For example, the processing component 402 can include a multimedia module to facilitate interaction between the multimedia component 408 and the processing component 402.
The memory 404 is configured to store various types of data to support operations at the apparatus 400. Examples of such data include instructions for any application or method operating on the device 400, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 404 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power supply components 406 provide power to the various components of device 400. The power components 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power supplies for the apparatus 400.
The multimedia component 408 includes a screen that provides an output interface between the device 400 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the apparatus 400 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 410 is configured to output and/or input audio signals. For example, audio component 410 includes a Microphone (MIC) configured to receive external audio signals when apparatus 400 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 404 or transmitted via the communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.
The I/O interface 412 provides an interface between the processing component 402 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 414 includes one or more sensors for providing various aspects of status assessment for the apparatus 400. For example, the sensor assembly 414 may detect an open/closed state of the apparatus 400, the relative positioning of the components, such as a display and keypad of the apparatus 400, the sensor assembly 414 may also detect a change in the position of the apparatus 400 or a component of the apparatus 400, the presence or absence of user contact with the apparatus 400, orientation or acceleration/deceleration of the apparatus 400, and a change in the temperature of the apparatus 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 416 is configured to facilitate wired or wireless communication between the apparatus 400 and other devices. The apparatus 400 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 400 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the control method of the flash lamp provided in the above-described fig. 1 or fig. 2 embodiment.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 404 comprising instructions, executable by the processor 420 of the apparatus 400 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In another embodiment, there is provided a control device for a flash, the device comprising a processor and a memory for storing processor-executable instructions; wherein the processor is configured to execute the control method of the flash lamp provided in the embodiment of fig. 1 or fig. 2.
In another embodiment, a non-transitory computer-readable storage medium is provided, which stores instructions that, when executed by a processor, may implement the method for controlling a flash provided in the above-described embodiment of fig. 1 or fig. 2.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (12)
1. A method for controlling a flash lamp is applied to a terminal, and the method comprises the following steps:
detecting a shielded state of the camera;
judging whether the shielded state meets a preset starting condition or not;
and when the shielded state meets the preset starting condition, starting the flash lamp.
2. The method of claim 1, wherein the determining whether the occluded state meets a preset opening condition comprises:
when the shielded state comprises the time length of the camera which is shielded and the shielded time length is greater than or equal to a first preset time length, determining that the shielded state meets the preset starting condition; and/or the presence of a gas in the gas,
when the shielded state comprises the continuous shielding times of the camera and the continuous shielding times are greater than or equal to the preset times, determining that the shielded state meets the preset starting condition; and/or the presence of a gas in the gas,
and when the shielded state comprises the interval duration of two continuous times of shielding of the camera and the interval duration is less than or equal to a second preset duration, determining that the shielded state meets the preset starting condition.
3. The method of claim 1, wherein after the turning on the flash, further comprising:
when the camera is detected to be shielded, determining the shielding time length of the camera;
and when the determined duration is greater than or equal to a third preset duration, turning off the flash lamp.
4. The method of claim 1, wherein the detecting the occluded state of the camera comprises:
detecting a shielded state of the camera through a photosensitive element of the camera; or,
the shielding state of the camera is detected through the light sensor, and the light sensor is located in the preset distance range of the camera.
5. The method of any one of claims 1-4, wherein the camera is a front-facing camera or a rear-facing camera.
6. A control device of a flash lamp is applied to a terminal, and the device comprises:
the detection module is used for detecting the shielded state of the camera;
the judging module is used for judging whether the shielded state meets a preset starting condition or not;
and the starting module is used for starting the flash lamp when the shielded state meets the preset starting condition.
7. The apparatus of claim 6, wherein the determining module comprises:
the first judgment submodule is used for determining that the shielded state meets the preset opening condition when the shielded state comprises the time length of shielding the camera and the shielded time length is greater than or equal to a first preset time length; and/or the presence of a gas in the gas,
the second judgment submodule is used for determining that the shielded state meets the preset starting condition when the shielded state comprises the continuous shielded times of the camera and the continuous shielded times are greater than or equal to the preset times; and/or the presence of a gas in the gas,
and the third judgment submodule is used for determining that the shielded state meets the preset opening condition when the shielded state comprises an interval duration of shielding the camera for two consecutive times, and the interval duration is less than or equal to a second preset duration.
8. The apparatus of claim 6, wherein the apparatus further comprises:
the determining module is used for determining the duration of the shielding of the camera when the shielding of the camera is detected;
and the closing module is used for closing the flash lamp when the determined duration is greater than or equal to a third preset duration.
9. The apparatus of claim 6, wherein the detection module comprises:
the first detection submodule is used for detecting the shielded state of the camera through a photosensitive element of the camera; or,
and the second detection submodule is used for detecting the shielded state of the camera through a light sensor, and the light sensor is positioned in the preset distance range of the camera.
10. The apparatus of any one of claims 6-9, wherein the camera is a front-facing camera or a rear-facing camera.
11. A control device for a flashlight, the device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the steps of any of the methods of claims 1-5.
12. A non-transitory computer readable storage medium having instructions stored thereon, wherein the instructions, when executed by a processor, implement the steps of any of the methods of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710914718.5A CN107566750A (en) | 2017-09-30 | 2017-09-30 | Control method, device and the storage medium of flash lamp |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710914718.5A CN107566750A (en) | 2017-09-30 | 2017-09-30 | Control method, device and the storage medium of flash lamp |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107566750A true CN107566750A (en) | 2018-01-09 |
Family
ID=60984901
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710914718.5A Pending CN107566750A (en) | 2017-09-30 | 2017-09-30 | Control method, device and the storage medium of flash lamp |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107566750A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109327650A (en) * | 2018-09-13 | 2019-02-12 | 广东美的制冷设备有限公司 | Household appliance, the control method of household appliance and storage medium |
CN110888534A (en) * | 2019-11-28 | 2020-03-17 | 深圳传音控股股份有限公司 | Flashlight control method of terminal equipment, terminal equipment and storage medium |
CN111711762A (en) * | 2020-06-30 | 2020-09-25 | 云从科技集团股份有限公司 | Camera lens module shielding control method and device based on target detection and camera |
CN113538762A (en) * | 2021-09-16 | 2021-10-22 | 深圳市海清视讯科技有限公司 | Entrance guard flat panel device menu control method, device, equipment, medium and product |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102902353A (en) * | 2012-08-17 | 2013-01-30 | 广东欧珀移动通信有限公司 | Method for switching photographic equipment of intelligent terminal |
CN103428368A (en) * | 2013-08-09 | 2013-12-04 | 深圳辉烨通讯技术有限公司 | Method and device for realizing silent incoming call of intelligent terminal |
CN103856707A (en) * | 2012-12-03 | 2014-06-11 | 联想(北京)有限公司 | Camera switchover method and device and electronic device |
CN105243350A (en) * | 2014-05-28 | 2016-01-13 | 腾讯科技(深圳)有限公司 | Code scanning method and code scanning device |
CN106982273A (en) * | 2017-03-31 | 2017-07-25 | 努比亚技术有限公司 | Mobile terminal and its control method |
-
2017
- 2017-09-30 CN CN201710914718.5A patent/CN107566750A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102902353A (en) * | 2012-08-17 | 2013-01-30 | 广东欧珀移动通信有限公司 | Method for switching photographic equipment of intelligent terminal |
CN103856707A (en) * | 2012-12-03 | 2014-06-11 | 联想(北京)有限公司 | Camera switchover method and device and electronic device |
CN103428368A (en) * | 2013-08-09 | 2013-12-04 | 深圳辉烨通讯技术有限公司 | Method and device for realizing silent incoming call of intelligent terminal |
CN105243350A (en) * | 2014-05-28 | 2016-01-13 | 腾讯科技(深圳)有限公司 | Code scanning method and code scanning device |
CN106982273A (en) * | 2017-03-31 | 2017-07-25 | 努比亚技术有限公司 | Mobile terminal and its control method |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109327650A (en) * | 2018-09-13 | 2019-02-12 | 广东美的制冷设备有限公司 | Household appliance, the control method of household appliance and storage medium |
CN110888534A (en) * | 2019-11-28 | 2020-03-17 | 深圳传音控股股份有限公司 | Flashlight control method of terminal equipment, terminal equipment and storage medium |
CN111711762A (en) * | 2020-06-30 | 2020-09-25 | 云从科技集团股份有限公司 | Camera lens module shielding control method and device based on target detection and camera |
CN113538762A (en) * | 2021-09-16 | 2021-10-22 | 深圳市海清视讯科技有限公司 | Entrance guard flat panel device menu control method, device, equipment, medium and product |
CN113538762B (en) * | 2021-09-16 | 2021-12-14 | 深圳市海清视讯科技有限公司 | Menu control method, device, system, medium and product of entrance guard flat panel device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110796988B (en) | Backlight adjusting method and device | |
CN105245775B (en) | camera imaging method, mobile terminal and device | |
EP2991067B1 (en) | Backlight brightness control method and device | |
CN104023434A (en) | Intelligent lamp turning-on method, device and system | |
CN107390932B (en) | Edge false touch prevention method and device and computer readable storage medium | |
US10318069B2 (en) | Method for controlling state of touch screen, and electronic device and medium for implementing the same | |
EP3361369B1 (en) | Method and device for displaying time on mobile device | |
CN104216525B (en) | Method and device for mode control of camera application | |
CN105487857A (en) | Method and apparatus for prompting image shooting part to be started | |
CN110262692B (en) | Touch screen scanning method, device and medium | |
CN105516587A (en) | Method for switching cameras and mobile terminal | |
CN108040213B (en) | Method and apparatus for photographing image and computer-readable storage medium | |
CN107566750A (en) | Control method, device and the storage medium of flash lamp | |
CN113055966B (en) | Frequency band switching method, frequency band switching device and storage medium | |
CN106953991A (en) | Display mode switching method and device | |
CN106170141B (en) | Mobile terminal network switching method and device | |
CN108874450B (en) | Method and device for waking up voice assistant | |
CN105227426B (en) | Application interface switching method and device and terminal equipment | |
CN106775246B (en) | Screen brightness adjusting method and device | |
CN106445122B (en) | Equipment state control method and device | |
CN106228933B (en) | Backlight circuit for lamp, method for implementing backlight and electronic equipment | |
CN109922203B (en) | Terminal, screen off method and device | |
CN112689047B (en) | Display control method and device and electronic equipment | |
CN105100135A (en) | Network sharing setting method and device | |
CN104301708B (en) | 3D display method, device and terminal |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180109 |