CN114189622B - Image shooting method, device, electronic equipment and storage medium - Google Patents

Image shooting method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114189622B
CN114189622B CN202010962596.9A CN202010962596A CN114189622B CN 114189622 B CN114189622 B CN 114189622B CN 202010962596 A CN202010962596 A CN 202010962596A CN 114189622 B CN114189622 B CN 114189622B
Authority
CN
China
Prior art keywords
information
laser ranging
preset
ambient light
focusing distance
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
CN202010962596.9A
Other languages
Chinese (zh)
Other versions
CN114189622A (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202010962596.9A priority Critical patent/CN114189622B/en
Publication of CN114189622A publication Critical patent/CN114189622A/en
Application granted granted Critical
Publication of CN114189622B publication Critical patent/CN114189622B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Studio Devices (AREA)

Abstract

The disclosure relates to an image shooting method, an image shooting device, an electronic device and a storage medium, wherein the image shooting method comprises the following steps: acquiring laser ranging information, focusing distance information and ambient light information; setting a shooting mode as a preset mode according to the laser ranging information, the focusing distance information and the ambient light information; in a preset mode, the laser ranging module is in a closed state; and image shooting is carried out in a preset mode. According to the image shooting method, when an image is shot, the laser ranging module (such as the TOF module) is closed according to the laser ranging information, the focusing distance information and the ambient light information, so that the problem of purple spots generated by shooting in a special environment is solved, the shooting effect can be ensured, and the shooting experience of a user is improved.

Description

Image shooting method, device, electronic equipment and storage medium
Technical Field
The disclosure relates to the field of electronic equipment, and in particular relates to an image shooting method, an image shooting device, electronic equipment and a storage medium.
Background
Many electronic devices are provided with TOF (Time of flight) modules to assist in focusing and assist in white balance calculation. The TOF module comprises a laser sensor (such as an infrared laser sensor), and the distance between the TOF module and the target object is calculated through the flight time of laser.
Most cameras have poor filtering performance on infrared laser, so that the laser emitted by the TOF module cannot be seen by the eyes of people, but the laser emitted by the TOF module can be captured by the cameras. When shooting in daytime, the influence of laser emitted by the TOF module on the shooting effect is not obvious, but when the light of the shooting environment is darker (such as in cloudy days or at night), if shooting or video recording is carried out on a glass window, a very obvious purple spot can be seen in imaging, the shooting effect is influenced, and the shooting experience is poor.
Disclosure of Invention
In order to overcome the problems in the related art, the present disclosure provides an image capturing method, apparatus, electronic device, and storage medium.
According to a first aspect of embodiments of the present disclosure, there is provided an image capturing method, applied to an electronic device, the method including:
acquiring laser ranging information, focusing distance information and ambient light information;
setting a shooting mode to a preset mode according to the laser ranging information, the focusing distance information and the ambient light information; in the preset mode, the laser ranging module is in a closed state;
and image shooting is carried out in the preset mode.
Optionally, the setting the shooting mode to a preset mode according to the laser ranging information, the focusing distance information and the ambient light information includes:
And setting a shooting mode as the preset mode under the condition that the laser ranging information meets a first preset condition, the focusing distance information meets a second preset condition and the ambient light information meets a third preset condition.
Optionally, before the laser ranging information meets a first preset condition, the focusing distance information meets a second preset condition, and the ambient light information meets a third preset condition, the setting the shooting mode to the preset mode includes:
and determining that the laser ranging information meets the first preset condition when the laser ranging information is smaller than or equal to the first preset distance.
Optionally, before the laser ranging information meets a first preset condition, the focusing distance information meets a second preset condition, and the ambient light information meets a third preset condition, the setting the shooting mode to the preset mode includes:
and determining that the focusing distance information meets the second preset condition when the focusing distance information is larger than or equal to the second preset distance.
Optionally, before the laser ranging information meets a first preset condition, the focusing distance information meets a second preset condition, and the ambient light information meets a third preset condition, the setting the shooting mode to the preset mode includes:
And determining that the ambient light information meets the third preset condition when the ambient light information is smaller than or equal to the preset illumination value.
Optionally, after the image capturing is performed in the preset mode, the capturing method further includes:
acquiring motion state information of the electronic equipment;
and when the electronic equipment is determined to move and the focusing distance information and the ambient light information are determined to change, starting the laser ranging module.
According to a second aspect of embodiments of the present disclosure, there is provided an image capturing apparatus applied to an electronic device, the apparatus including:
the acquisition module is used for acquiring laser ranging information, focusing distance information and ambient light information;
the determining module is used for setting a shooting mode to be a preset mode according to the laser ranging information, the focusing distance information and the ambient light information; in the preset mode, the laser ranging module is in a closed state;
the determining module is further used for shooting images in the preset mode.
Optionally, the determining module is configured to:
and setting a shooting mode as the preset mode under the condition that the laser ranging information meets a first preset condition, the focusing distance information meets a second preset condition and the ambient light information meets a third preset condition.
Optionally, the determining module is further configured to:
and determining that the laser ranging information meets the first preset condition when the laser ranging information is smaller than or equal to the first preset distance.
Optionally, the determining module is further configured to:
and determining that the focusing distance information meets the second preset condition when the focusing distance information is larger than or equal to the second preset distance.
Optionally, the determining module is further configured to:
and determining that the ambient light information meets the third preset condition when the ambient light information is smaller than or equal to the preset illumination value.
Optionally, the acquiring module is further configured to acquire motion state information of the electronic device;
the determining module is further configured to start the laser ranging module when it is determined that the electronic device moves and it is determined that focusing distance information and ambient light information change.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the image capturing method according to the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform the image capturing method as described in the first aspect.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects: according to the image shooting method, when an image is shot, whether the laser ranging module (e.g. the TOF module) is closed or not is determined according to the laser ranging information, the focusing distance information and the environment light information, so that the problem of purple spots generated by shooting in a special environment is solved, the shooting effect can be ensured, and the shooting experience of a user is improved.
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 invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a flowchart illustrating an image photographing method according to an exemplary embodiment.
Fig. 2 is a flowchart illustrating an image photographing method according to an exemplary embodiment.
Fig. 3 is a flowchart illustrating an image photographing method according to an exemplary embodiment.
Fig. 4 is a flowchart illustrating an image photographing method according to an exemplary embodiment.
Fig. 5 is a block diagram of an image photographing device according to an exemplary embodiment.
Fig. 6 is a block diagram of an electronic device, shown in accordance with an exemplary embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the invention. Rather, they are merely examples of apparatus and methods consistent with aspects of the invention as detailed in the accompanying claims.
In the related art, a layer of filtering film is coated on a lens of a camera, and infrared laser emitted by a TOF (Time of flight) module is filtered through the filtering film. However, the method has the problem that the cost of the filtering film is high, under the limit of a certain cost, the cut-off performance of the filtering film is difficult to just remove the infrared laser, and other light can be influenced, namely, the filtering film can remove the infrared light and the light of other wave bands at the same time, so that the light input amount is reduced, the photographed image is darkened, and the photographing experience of a user is poor.
In addition, in order to improve photographing quality, the existing electronic devices (such as mobile phones) use multi-frame synthesis technology when photographing. When previewing, the photographed picture is stored in real time, and when the shutter key is pressed, the current photographed picture and 8-10 photographed pictures stored before are taken for multi-frame synthesis so as to ensure photographing quality.
In the method, if the influence of infrared laser is to be removed, when the shutter is to be pressed down, firstly infrared light is removed, then the shutter is pressed down again after 8-10 frames of photographing pictures are determined, and then the current photographing picture and 8-10 previous stored photographing pictures are taken for multi-frame synthesis. However, this increases the photographing time, and the waiting time of the user is long, and the experience is poor.
Moreover, the method is only suitable for photographing (taking pictures), is not suitable for video and previewing scenes, and has a narrow application range and poor adaptability.
Aiming at the problem of purple specks caused by a TOF module in the related art, the disclosure provides an image shooting method which is applied to electronic equipment. According to the image shooting method, when an image is shot, whether the laser ranging module (e.g. the TOF module) is closed or not is determined according to the laser ranging information, the focusing distance information and the environment light information, so that the problem of purple spots generated by shooting in a special environment is solved, the shooting effect can be ensured, and the shooting experience of a user is improved.
In one exemplary embodiment, there is provided an image photographing method, as shown with reference to fig. 1, including:
s110, acquiring laser ranging information, focusing distance information and ambient light information.
The laser ranging information refers to a distance value measured using a laser. For the electronic equipment provided with the TOF module, the TOF module can directly determine the laser ranging information, and the TOF module reports the laser ranging information to the controller after determining the laser ranging information. When facing glass materials, laser is reflected, so that the back transmission time of the laser sent by the TOF module is shorter, and the determined laser ranging information is smaller. For example, when the electronic apparatus photographs a photographic target outside the glazing against the glazing, if the distance between the camera and the glazing is 10 cm and the distance between the camera and the photographic target outside the glazing is 100 m, the obtained laser ranging information is 10 cm.
The focusing distance information refers to the distance information determined by the focusing module, and the focusing module reports the focusing distance information to the controller after determining the focusing distance information. When the electronic device shoots a shooting target outside the glass window opposite to the glass window, the determination of the focusing distance information is not influenced by the glass window, and if the distance between the camera and the shooting target is 100 meters and the distance between the camera and the glass window is 10 centimeters, the determined focusing distance information is 100 meters.
The ambient light information refers to the illumination intensity, also called illuminance, of the light of the shooting environment, and can be sensed by light sensing and then reported to the controller. Ambient light information may be obtained by light sensor detection.
S120, setting a shooting mode to a preset mode according to the laser ranging information, the focusing distance information and the ambient light information, wherein the laser ranging module is in a closed state in the preset mode.
When the step is executed, judgment is needed according to the laser ranging information, the focusing distance information and the ambient light information, when certain conditions are met, the shooting mode is set to be a preset mode, and if the conditions are not met, shooting is carried out in other modes stored in the electronic equipment.
S130, image shooting is carried out in a preset mode.
When the judgment result in step S120 is that the shooting mode is the preset mode, the controller of the electronic device controls the laser ranging module to be in the off state, and performs image shooting when the laser ranging module is in the off state.
If the entering of the preset mode is determined according to the laser ranging information, the focusing distance information and the ambient light information, the fact that an object reflecting infrared light exists in the current shooting state is indicated, purple spots are prone to occurring on a shot picture, and in order to improve shooting effect, the laser ranging module can be closed for image shooting. That is, the laser ranging module is in the closed state for shooting, so that the influence of laser emitted by the laser ranging module (such as a TOF module) on shooting is eliminated, the generation of purple spots is avoided, the shooting effect is improved, and the user experience is improved.
Here, it should be noted that, in the embodiment, the obtaining manner of the laser ranging information may be obtained by starting the laser ranging module for detection, that is, before entering the preset mode, the laser ranging module is in the on state. The laser ranging information may be obtained by using information obtained before, that is, before entering the preset mode, the laser ranging module is in the off state.
In addition, it should be noted that if the laser ranging information, the focusing distance information and the ambient light information are judged and then do not meet the conditions, if the preset mode is not entered according to the laser ranging information, the focusing distance information and the ambient light information, it is stated that in the current shooting state, no object which can reflect infrared light exists, and purple spots are not easy to generate on the shot image, at this time, the laser ranging module (such as the TOF module) can be controlled to be in the on state for shooting, focusing and white balance are assisted through the laser ranging module, the shooting effect is improved, and the user experience is improved.
According to the image shooting method, when an image is shot, whether the laser ranging module (such as a TOF module) is closed or not is determined according to the laser ranging information, the focusing distance information and the environment light information, namely, the opening and closing of the laser ranging module are determined according to the actual conditions, so that the ultraviolet spots can be eliminated, the shooting effect can be ensured, and the use experience is improved.
In one exemplary embodiment, an image photographing method is provided, which is a further improvement of the above image photographing method. Illustratively, setting the photographing mode to the preset mode according to the laser ranging information, the focusing distance information, and the ambient light information may include: and setting a shooting mode as a preset mode under the condition that the laser ranging information meets the first preset condition, the focusing distance information meets the second preset condition and the ambient light information meets the third preset condition.
And judging whether the laser ranging information, the focusing distance information and the ambient light information meet the condition or not.
In a specific implementation process, setting the shooting mode to the preset mode according to the laser ranging information, the focusing distance information and the ambient light information may be performed in the following manner. Referring to fig. 2, determining whether to enter a preset mode according to laser ranging information, focusing distance information and ambient light information includes:
s210, judging whether the laser ranging information meets a first preset condition, the focusing distance information meets a second preset condition and the environment light information meets a third preset condition.
The method comprises the steps of judging whether the laser ranging information meets a first preset condition, judging whether the focusing distance information meets a second preset condition and judging whether the ambient light information meets a third preset condition, wherein the three steps can be performed simultaneously or sequentially.
When the three are performed simultaneously, the judging time can be shortened, and the latter judgment is performed after the former judgment is not needed to be completed.
When the three are performed in sequence, the sequence of the three can be set in advance, and the sequence of the three can be determined according to the sequence of the obtained laser ranging information, focusing distance information and ambient light information.
In one example, the advance setting is performed sequentially to determine whether the laser ranging information satisfies a first preset condition, to determine whether the focusing distance information satisfies a second preset condition, and to determine whether the ambient light information satisfies a third preset condition.
In this example, regardless of the order in which the laser ranging information, the focusing distance information, and the ambient light information are acquired, it is directly determined in a fixed order whether the laser ranging information satisfies a first preset condition, whether the focusing distance information satisfies a second preset condition, and whether the ambient light information satisfies a third preset condition, and then whether to enter a preset mode is determined according to the result.
In one example, determining whether the laser ranging information meets the first preset condition, whether the focusing distance information meets the second preset condition, and whether the ambient light information meets the third preset condition are determined according to the sequence of acquiring the laser ranging information, the focusing distance information and the ambient light information, so that shooting efficiency is improved.
For example, if the ambient light information is obtained first, whether the ambient light information meets a third preset condition is judged first; secondly, acquiring laser ranging information, and secondly judging whether the laser ranging information meets a first preset condition; and finally, judging whether the focusing distance information meets a second preset condition or not. And then determining whether to enter a preset mode according to the judging result.
S220, determining to enter a preset mode when the laser ranging information, the focusing distance information and the environment light information respectively meet a first preset condition, a second preset condition and a third preset condition.
Any one of the laser ranging information, the focusing distance information and the ambient light information does not meet the corresponding preset conditions, and is insufficient for generating the purple specks. Thus, it is set as follows: and determining to enter a preset mode when the laser ranging information, the focusing distance information and the ambient light information simultaneously meet corresponding preset conditions.
S230, when the laser ranging information, the focusing distance information and the ambient light information do not respectively meet the first preset condition, the second preset condition and the third preset condition, determining that the preset mode is not required to be entered.
The "laser ranging information, focusing distance information and ambient light information do not satisfy the first preset condition, the second preset condition and the third preset condition" means that at least one of the results of "judging whether the laser ranging information satisfies the first preset condition", "judging whether the focusing distance information satisfies the second preset condition" and "judging whether the ambient light information satisfies the third preset condition" is "no".
In one example, after all of the laser ranging information to be judged whether the first preset condition is satisfied, the focusing distance information is judged whether the second preset condition is satisfied, and the ambient light information is judged whether the third preset condition is satisfied, whether to enter a preset mode is determined according to the judgment result.
In this example, it is determined whether the laser ranging information satisfies a first preset condition, whether the focusing distance information satisfies a second preset condition, and whether the ambient light information satisfies a third preset condition, and then whether to enter a preset mode is determined according to the determination result.
Only when the laser ranging information, the focusing distance information and the environment light information respectively meet the first preset condition, the second preset condition and the third preset condition, the ultraviolet spot can be generated, the laser ranging module is determined to enter the preset mode at the moment, the laser ranging module is closed for image shooting, the ultraviolet spot is eliminated, and the shooting effect is improved.
In one example, the two components are directly in a fixed order: firstly judging whether the laser ranging information meets a first preset condition, secondly judging whether the focusing distance information meets a second preset condition, finally judging whether the ambient light information meets a third preset condition, and then determining whether to enter a preset mode according to the result.
In this example, after the three are judged, whether to enter a preset mode is determined according to the judgment result.
In one example, the two components are directly in a fixed order: firstly judging whether the laser ranging information meets a first preset condition, secondly judging whether the focusing distance information meets a second preset condition, finally judging whether the ambient light information meets a third preset condition, and then determining whether to enter a preset mode according to the result.
In this example, if the laser ranging information does not satisfy the first preset condition, no subsequent judgment is made, and it is directly determined that the preset mode is not required to be entered. If the laser ranging information meets the first preset condition, but the focusing distance information does not meet the second preset condition, the subsequent judgment is not carried out, and the fact that the user does not need to enter the preset mode is directly determined. That is, in this example, only when the determination result of the former is yes, the subsequent determination is performed, otherwise, it is directly determined that the preset mode is not required to be entered, so that the determination efficiency is improved, and further, the shooting efficiency is improved.
In one example, determining whether the laser ranging information meets the first preset condition, whether the focusing distance information meets the second preset condition, and whether the ambient light information meets the third preset condition are determined according to the sequence of acquiring the laser ranging information, the focusing distance information and the ambient light information, so that shooting efficiency is improved.
In this example, after the three are judged, whether to enter a preset mode is determined according to the judgment result.
In one example, determining whether the laser ranging information meets the first preset condition, whether the focusing distance information meets the second preset condition, and whether the ambient light information meets the third preset condition are determined according to the sequence of acquiring the laser ranging information, the focusing distance information and the ambient light information, so that shooting efficiency is improved.
In this example, for example, the ambient light information is obtained first, and then it is first determined whether the ambient light information satisfies a third preset condition; secondly, acquiring laser ranging information, and secondly judging whether the laser ranging information meets a first preset condition; and finally, judging whether the focusing distance information meets a second preset condition or not.
When the ambient light information does not satisfy the third preset condition, no operation is performed with respect to determining whether to enter the preset mode. For example, when it is determined that the ambient light information does not satisfy the third preset condition, if the laser ranging information is not acquired at this time, the operation of acquiring the laser ranging information is not performed any more, and it is directly determined that the entering of the preset mode is not required.
This example may further improve the efficiency of determining whether to enter the preset mode, thereby improving the photographing efficiency.
In an exemplary embodiment (this embodiment is not shown in the drawings), an image capturing method is provided, which is a further improvement of the above-described image capturing method. When the laser ranging information satisfies the first preset condition, the focusing distance information satisfies the second preset condition, and the ambient light information satisfies the third preset condition, before setting the photographing mode to the preset mode, the method may include: and determining that the focusing distance information meets a second preset condition when the focusing distance information is larger than or equal to a second preset distance.
Here, by determining whether the laser ranging information satisfies the first preset condition, determining that the laser ranging information satisfies the first preset condition based on the determination result, for example, by determining whether the laser ranging information is less than or equal to the first preset distance; if the laser ranging information is smaller than or equal to the first preset distance, the laser ranging information meets the first preset condition.
Since the conditions for generating the purple spots by different cameras are different, the first preset distance is determined according to the specific structure of the camera of the electronic device, and the first preset distance can be measured through experiments, for example.
In a first example, the first preset distance is 20cm. When the laser ranging information is 10cm, the laser ranging information is smaller than or equal to a first preset distance, and the laser ranging information meets a first preset condition; when the laser distance measurement information is 30cm, the laser distance measurement information is not smaller than or equal to the first preset distance, and the laser distance measurement information is not satisfied with the first preset condition.
When the laser ranging information meets the first preset condition, the focusing distance information meets the second preset condition, and the ambient light information meets the third preset condition, before the shooting mode is set to the preset mode, the method may further include: and determining that the focusing distance information meets a second preset condition when the focusing distance information is larger than or equal to a second preset distance.
Here, determining whether the focusing distance information satisfies the second preset condition may include the following: judging whether the focusing distance information is larger than or equal to a second preset distance; and if the focusing distance information is larger than or equal to the second preset distance, the focusing distance information meets the second preset condition.
Since the conditions for generating the purple spots by different cameras are different, the second preset distance is determined according to the specific structure of the camera of the electronic device, and the second preset distance can be measured through experiments, for example.
In one example, the second preset distance is 50cm. When the focusing distance information is 100m, the focusing distance information is larger than or equal to a second preset distance, and the focusing distance information meets a second preset condition; when the focusing distance information is 30cm, the focusing distance information is smaller than the second preset distance, and the focusing distance information does not meet the second preset condition.
In one example, the second preset distance is 50m. When the focusing distance information is 100m, the focusing distance information is larger than or equal to a second preset distance, and the focusing distance information meets a second preset condition; when the focusing distance information is 30m, the focusing distance information is smaller than the second preset distance, and the focusing distance information does not meet the second preset condition.
When the laser ranging information meets the first preset condition, the focusing distance information meets the second preset condition, and the ambient light information meets the third preset condition, before the shooting mode is set to the preset mode, the method may further include: and determining that the ambient light information meets a third preset condition when the ambient light information is smaller than or equal to the preset illumination value.
Here, determining whether the ambient light information satisfies the third preset condition may include the following manner: judging whether the ambient light information is smaller than or equal to a preset illumination value or not; if the ambient light information is less than or equal to the preset illumination value, the ambient light information meets a third preset condition.
Since conditions for generating the purple spots are different from one camera to another, the preset illuminance value is determined according to a specific structure of the camera of the electronic device, and may be measured by experiments, for example.
In one example, the preset illumination value is the illumination with the room on, for example 100Lux. When the ambient light information is 20Lux, the ambient light information is smaller than or equal to a preset illumination value, and the ambient light information meets a third preset condition; when the ambient light information is 200Lux, the ambient light information is not satisfied with the preset illumination value or less, and the ambient light information is not satisfied with the third preset condition.
In an exemplary embodiment, there is provided an image photographing method, which is a further improvement of the photographing method described above, for example, referring to fig. 3, after performing image photographing in a preset mode, the photographing method further includes:
S310, acquiring motion state information of the electronic equipment.
Wherein, the step of acquiring the motion state information of the electronic device includes acquiring the motion state information of the electronic device in real time and acquiring the motion state information of the electronic device at intervals.
The movement state information of the electronic equipment is acquired in real time, and then whether the laser ranging module is started or not is controlled according to the movement state information, so that the electronic equipment can be better ensured to quickly adjust the laser ranging module according to the movement state information, and the shooting effect is better improved.
The motion state information of the electronic equipment is acquired at intervals, so that the power consumption in the shooting process of the electronic equipment can be reduced better, the occupation of resources is reduced, and the shooting efficiency is improved.
The movement state information of the electronic device may be determined by Gyro (Gyro), or by a plurality of sensors. The method for acquiring the motion state information of the electronic device is not described herein.
S320, determining whether the electronic equipment moves according to the movement state information.
The motion state information includes position information, speed information, acceleration information, and the like, and a method for determining whether the electronic device moves according to the motion state information is not described herein.
S330, when the electronic equipment moves and the focusing distance information and the ambient light information are determined to change, the laser ranging module is started.
In general, when the electronic device moves, the focusing distance information and the ambient light information of the electronic device are necessarily changed, so that the laser ranging module can be directly started to judge whether the ultraviolet spot can be generated in the current shooting environment or not.
In one example, when the electronic device moves, the focusing distance information and the ambient light information are considered to be changed, so that the preset mode is exited, the laser ranging module is started, then the acquisition of the laser ranging information, the focusing distance information and the ambient light information is performed again, and then whether the laser ranging module needs to be closed or not is determined according to the new laser ranging information, the new focusing distance information and the new ambient light information, so that the shooting effect is ensured.
It should be noted that, in some cases, when the electronic device moves, the focusing distance information and the ambient light information may not change, and this situation does not require to turn on the laser ranging module. Therefore, when the electronic device moves, it is also necessary to determine whether the focusing distance information and the ambient light information change. And only when the electronic equipment is determined to move and the focusing distance information and the ambient light information are determined to change, the laser ranging module is started.
And S340, when the electronic equipment does not move, controlling the laser ranging module to be kept closed.
If the electronic equipment does not move, the laser ranging information, the focusing distance information and the environment light information are not changed, so that the acquisition of the laser ranging information, the focusing distance information and the environment light information is not required to be carried out again, and the shooting effect can be ensured by maintaining the existing shooting setting.
In the shooting method, when the motion state of the electronic equipment is changed, the laser ranging module is determined to be restarted, and then the following steps are realized: and determining whether to turn off the laser ranging module again according to the motion state of the electronic equipment. The method is suitable for different shooting scenes such as photo shooting, preview, video recording and the like.
In an exemplary embodiment, there is provided an image photographing method which is a further improvement of the photographing method described above, and illustratively, before acquiring the laser ranging information, the focusing distance information, and the ambient light information, the photographing method further includes:
judging whether the set condition is met; if the set condition is satisfied, the process proceeds to the step: acquiring laser ranging information, focusing distance information and ambient light information, and determining whether to close the laser ranging module again; if the setting condition is not satisfied, the step of acquiring the laser ranging information, the focusing distance information and the ambient light information is not performed, and the current shooting setting is maintained.
Wherein, judge the settlement condition and include the following two kinds of cases:
case one: the electronic device enters a shooting state from a non-shooting state.
After the electronic equipment enters a shooting state from a non-shooting state, in order to avoid purple spots generated by a shot image, laser ranging information, focusing distance information and ambient light information are respectively acquired, and whether the laser ranging module needs to be closed or not is determined according to the laser ranging information, the focusing distance information and the ambient light information, so that shooting effect is ensured.
And a second case: under the shooting state of the electronic equipment, the electronic equipment moves and controls the laser ranging module to be in an on state.
When the electronic equipment moves in a shooting state, the laser ranging information, the focusing distance information and the ambient light information can be changed, so that the laser ranging module is controlled to be in an on state, namely, if the laser ranging module is in an off state at the moment, the laser ranging module is restarted; if the laser ranging module is in the on state at this time, the on state of the laser ranging module is maintained.
And then, re-acquiring the laser ranging information, the focusing distance information and the environment light information, and determining whether the laser ranging module needs to be closed or not according to the new laser ranging information, the focusing distance information and the environment light information, so as to ensure the shooting effect.
In one example, referring to fig. 4, the method of the present disclosure may be implemented by:
and S410, controlling the electronic equipment to enter a shooting state from a non-shooting state based on the shooting control instruction.
S420, acquiring laser ranging information, focusing distance information and ambient light information.
S430, judging whether the laser ranging information meets the first preset condition, the focusing distance information meets the second preset condition and the environment light information meets the third preset condition. If the determination result is satisfied, step S440 is entered; otherwise, the process advances to step S450.
S440, closing the laser ranging module to shoot an image, and entering step S460.
S450, controlling the laser ranging module to be in an on state, shooting an image, and proceeding to step S460.
S460, acquiring motion state information of the electronic equipment.
S470, determining whether the electronic equipment moves according to the movement state information; when the electronic device moves, step S480 is entered; when the electronic device does not move, the step returns to step S460.
S480, restarting the laser ranging module, and entering step S420.
When the shooting state is changed from the non-shooting state, the image shooting method firstly determines whether to close the laser ranging module (such as a TOF module) according to the laser ranging information, the focusing distance information and the ambient light information, namely determines whether to set the shooting mode as a preset mode, and the laser ranging module is in a closing state under the preset mode. When the laser ranging information, the focusing distance information and the ambient light information generate purple spots, the laser ranging module is closed to avoid generating the purple spots and improve the shooting effect; when the laser ranging information, the focusing distance information and the environment light information cannot generate purple spots, the laser ranging module is in an on state, focusing is assisted and white balance calculation is assisted through the laser ranging module, and the shooting effect is improved.
In addition, under the shooting state of closing the laser range finding module, the motion state of the electronic equipment is detected in real time, the motion state information of the electronic equipment is obtained, whether the electronic equipment moves or not is determined according to the motion state information, whether refocusing is needed or whether the ambient light of the electronic equipment changes or not is determined. When the electronic equipment moves, the laser ranging module is restarted, and then whether the laser ranging module is closed is determined again according to the laser ranging information, the focusing distance information and the ambient light information. When the laser ranging information, the focusing distance information and the ambient light information generate purple spots, the laser ranging module is closed to avoid generating the purple spots and improve the shooting effect; when the laser ranging information, the focusing distance information and the environment light information cannot generate purple spots, the laser ranging module is in an on state, focusing is assisted and white balance calculation is assisted through the laser ranging module, and the shooting effect is improved.
The shooting method has the following effects:
first, this shooting method is not only applicable to the shooting of photo, still is applicable to shooting preview and video's shooting, has further promoted the use experience.
Secondly, the shooting method uses the technologies of a plurality of sensors such as a light sensor, a TOF module, a AF (Automatic Focus) focusing module, a Gyro sensor and the like to skillfully judge the scene which can generate the purple spots, thereby closing the TOF module at proper time. And the TOF module can be turned on again after the electronic equipment does not have a scene which can generate the purple spots according to the motion state information detected by the Gyro sensor, so that the use of the TOF module such as automatic focusing and automatic white balance can not be influenced.
Thirdly, the shooting method does not need to smear a filter film on a lens of the camera, is harmless to a picture, and does not increase any cost.
The disclosure also provides an image capturing device for implementing the image capturing method.
In an exemplary embodiment, an image capturing apparatus is provided, applied to an electronic device, and referring to fig. 1 and 5, the apparatus includes an obtaining module 101 and a determining module 102, configured to implement the image capturing method described above, for example, in an implementation process:
an acquisition module 101, configured to acquire laser ranging information, focusing distance information, and ambient light information, respectively;
a determining module 102, configured to set a shooting mode to a preset mode according to the laser ranging information, the focusing distance information, and the ambient light information; in a preset mode, the laser ranging module is in a closed state;
The determining module 102 is further configured to perform image capturing in a preset mode.
In an exemplary embodiment, an image capturing apparatus is provided, which is a further improvement of the apparatus described above, and as shown with reference to fig. 2 and 5, in an implementation, the determining module 102 may be configured to:
and setting a shooting mode as a preset mode under the condition that the laser ranging information meets the first preset condition, the focusing distance information meets the second preset condition and the ambient light information meets the third preset condition.
In an exemplary embodiment, an image capturing apparatus is provided, and referring to fig. 5, the apparatus is a further improvement of the foregoing apparatus, and in an implementation process, the determining module 102 may be further configured to:
and determining that the laser ranging information meets a first preset condition when the laser ranging information is smaller than or equal to the first preset distance.
In an exemplary embodiment, an image capturing apparatus is provided, and referring to fig. 5, the apparatus is a further improvement of the foregoing apparatus, and in an implementation process, the determining module 102 may be further configured to:
and determining that the focusing distance information meets a second preset condition when the focusing distance information is larger than or equal to a second preset distance.
In an exemplary embodiment, an image capturing apparatus is provided, and referring to fig. 5, the apparatus is a further improvement of the foregoing apparatus, and in an implementation process, the determining module 102 may be further configured to:
and determining that the ambient light information meets a third preset condition when the ambient light information is smaller than or equal to the preset illumination value.
In an exemplary embodiment, an image photographing device is provided, and referring to fig. 3 and 5, the device is a further improvement of the above device, after the laser ranging module is turned off for image photographing:
the acquisition module 101 is further configured to acquire motion state information of the electronic device;
the determining module 102 is further configured to turn on the laser ranging module when it is determined that the electronic device moves and it is determined that the focusing distance information and the ambient light information change.
In one exemplary embodiment, an electronic device is provided. For example, the electronic device may be a device having an image processing function such as a cellular phone, a computer, a tablet device, a camera, a video camera, or the like.
Referring to fig. 6, electronic device 400 may include one or more of the following components: a processing component 402, a memory 404, a power component 406, a multimedia component 408, an audio component 410, an input/output (I/O) interface 412, a sensor component 414, and a communication component 416.
The processing component 402 generally controls the overall operation of the device 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 part of the steps of the image capture method and/or image processing method 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 may include a multimedia module to facilitate interaction between the multimedia component 408 and the processing component 402.
Memory 404 is configured to store various types of data to support operations at device 400. Examples of such data include instructions for any application or method operating on device 400, contact data, phonebook data, messages, pictures, video, and the like. The memory 404 may be implemented by any type or combination of volatile or nonvolatile 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 disk.
The power component 406 provides power to the various components of the device 400. Power components 406 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for device 400.
The multimedia component 408 includes a screen between the device 400 and the user that provides an output interface. 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 input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or sliding action, but also the duration and pressure associated with the touch or sliding operation. In some embodiments, the multimedia component 408 includes a front camera and/or a rear camera. When the electronic device 400 is in an operational mode, such as a shooting mode or a video mode, the front-facing camera and/or the rear-facing camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
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 device 400 is in an operational mode, such as a call mode, a recording mode, and a speech recognition mode. The received audio signals may be further stored in the memory 404 or transmitted via the communication component 416. In some embodiments, audio component 410 further 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 a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 414 includes one or more sensors for providing status assessment of various aspects of the electronic device 400. For example, the sensor assembly 414 may detect an on/off state of the electronic device 400, a relative positioning of the components, such as a display and keypad of the electronic device 400, the sensor assembly 414 may also detect a change in position of the device 400 or a component of the electronic device 400, the presence or absence of user contact with the device 400, an orientation or acceleration/deceleration of the device 400, and a change in temperature of the device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects in the absence of 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 gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 416 is configured to facilitate communication between the device 400 and other devices, either wired or wireless. The device 700 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In one exemplary embodiment, the communication component 416 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one 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 electronic device 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, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 404, including instructions executable by processor 420 of device 400 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc. The instructions in the storage medium, when executed by a processor of the electronic device, enable the electronic device to perform the above-described method.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (6)

1. An image shooting method applied to electronic equipment is characterized in that the electronic equipment comprises a laser ranging module, and the method comprises the following steps:
acquiring laser ranging information, focusing distance information and ambient light information;
setting a shooting mode to a preset mode according to the laser ranging information, the focusing distance information and the ambient light information; in the preset mode, the laser ranging module is in a closed state;
Shooting an image in the preset mode;
wherein, according to the laser ranging information, the focusing distance information and the ambient light information, the shooting mode is set to a preset mode, including:
setting a shooting mode as a preset mode when the laser ranging information meets a first preset condition, the focusing distance information meets a second preset condition and the ambient light information meets a third preset condition;
under the condition that the laser ranging information is smaller than or equal to a first preset distance, determining that the laser ranging information meets the first preset condition; determining that the focusing distance information meets a second preset condition under the condition that the focusing distance information is larger than or equal to a second preset distance; and under the condition that the ambient light information is smaller than or equal to a preset illumination value, determining that the ambient light information meets the third preset condition.
2. The image capturing method according to claim 1, wherein after capturing an image in the preset mode, the capturing method further comprises:
acquiring motion state information of the electronic equipment;
and when the electronic equipment is determined to move and the focusing distance information and the ambient light information are determined to change, starting the laser ranging module.
3. An image shooting device applied to electronic equipment, which is characterized in that the electronic equipment comprises a laser ranging module, the device comprises:
the acquisition module is used for acquiring laser ranging information, focusing distance information and ambient light information;
the determining module is used for setting a shooting mode to be a preset mode according to the laser ranging information, the focusing distance information and the ambient light information; in the preset mode, the laser ranging module is in a closed state; and performing image shooting in the preset mode;
setting a shooting mode as a preset mode when the laser ranging information meets a first preset condition, the focusing distance information meets a second preset condition and the ambient light information meets a third preset condition;
the determining module is used for determining that the laser ranging information meets the first preset condition under the condition that the laser ranging information is smaller than or equal to a first preset distance; the determining module is further configured to determine that the focusing distance information meets a second preset condition when the focusing distance information is greater than or equal to a second preset distance; the determining module is further configured to determine that the ambient light information meets the third preset condition when the ambient light information is less than or equal to a preset illuminance value.
4. The image capturing apparatus according to claim 3, wherein,
the acquisition module is also used for acquiring the motion state information of the electronic equipment;
the determining module is further configured to start the laser ranging module when it is determined that the electronic device moves and it is determined that focusing distance information and ambient light information change.
5. An electronic device, comprising:
a processor;
a memory for storing a computer program executable by the processor;
wherein the processor is configured to perform the image capturing method according to any one of claims 1 or 2.
6. A non-transitory computer-readable storage medium, characterized in that a computer program in the storage medium, when executed by a processor of an electronic device, enables the electronic device to perform the image capturing method according to any one of claims 1 or 2.
CN202010962596.9A 2020-09-14 2020-09-14 Image shooting method, device, electronic equipment and storage medium Active CN114189622B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010962596.9A CN114189622B (en) 2020-09-14 2020-09-14 Image shooting method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010962596.9A CN114189622B (en) 2020-09-14 2020-09-14 Image shooting method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114189622A CN114189622A (en) 2022-03-15
CN114189622B true CN114189622B (en) 2023-11-24

Family

ID=80539076

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010962596.9A Active CN114189622B (en) 2020-09-14 2020-09-14 Image shooting method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114189622B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114666509A (en) * 2022-04-08 2022-06-24 Oppo广东移动通信有限公司 Image acquisition method and device, detection module, terminal and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106101546A (en) * 2016-06-30 2016-11-09 广东欧珀移动通信有限公司 A kind of laser focusing sensor control method and mobile terminal
CN106454078A (en) * 2016-09-26 2017-02-22 广东欧珀移动通信有限公司 Focusing mode control method and terminal device
CN107302632A (en) * 2017-06-28 2017-10-27 努比亚技术有限公司 A kind of mobile terminal image pickup method, mobile terminal and computer-readable recording medium
CN108028887A (en) * 2016-03-23 2018-05-11 华为技术有限公司 Focusing method of taking pictures, device and the equipment of a kind of terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108028887A (en) * 2016-03-23 2018-05-11 华为技术有限公司 Focusing method of taking pictures, device and the equipment of a kind of terminal
CN106101546A (en) * 2016-06-30 2016-11-09 广东欧珀移动通信有限公司 A kind of laser focusing sensor control method and mobile terminal
CN106454078A (en) * 2016-09-26 2017-02-22 广东欧珀移动通信有限公司 Focusing mode control method and terminal device
CN107302632A (en) * 2017-06-28 2017-10-27 努比亚技术有限公司 A kind of mobile terminal image pickup method, mobile terminal and computer-readable recording medium

Also Published As

Publication number Publication date
CN114189622A (en) 2022-03-15

Similar Documents

Publication Publication Date Title
US10674088B2 (en) Method and device for acquiring image, terminal and computer-readable storage medium
CN108419016B (en) Shooting method and device and terminal
EP3174285A1 (en) Camera shooting angle adjusting method and apparatus, computer program and recording medium
CN110557547B (en) Lens position adjusting method and device
JP4989767B2 (en) Camera system and method for operating the camera system
RU2665304C2 (en) Method and apparatus for setting photographing parameter
EP3352453B1 (en) Photographing method for intelligent flight device and intelligent flight device
EP3945494A1 (en) Video processing method, apparatus and storage medium
CN111385456A (en) Photographing preview method and device and storage medium
CN110995993B (en) Star track video shooting method, star track video shooting device and storage medium
CN108040213B (en) Method and apparatus for photographing image and computer-readable storage medium
CN113364965A (en) Shooting method and device based on multiple cameras and electronic equipment
CN107820025B (en) Method and device for photographing processing
CN114189622B (en) Image shooting method, device, electronic equipment and storage medium
CN107241535B (en) Flash lamp adjusting device and terminal equipment
CN111461950B (en) Image processing method and device
CN111586280B (en) Shooting method, shooting device, terminal and readable storage medium
CN112702514B (en) Image acquisition method, device, equipment and storage medium
US11617023B2 (en) Method for brightness enhancement of preview image, apparatus, and medium
CN113315903B (en) Image acquisition method and device, electronic equipment and storage medium
CN107707819B (en) Image shooting method, device and storage medium
CN107682623B (en) Photographing method and device
CN114666490A (en) Focusing method and device, electronic equipment and storage medium
CN112312034A (en) Exposure method and device of image acquisition module, terminal equipment and storage medium
CN114339017B (en) Distant view focusing method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant