CN112019763B - Photographing method and terminal equipment - Google Patents

Photographing method and terminal equipment Download PDF

Info

Publication number
CN112019763B
CN112019763B CN202010765565.4A CN202010765565A CN112019763B CN 112019763 B CN112019763 B CN 112019763B CN 202010765565 A CN202010765565 A CN 202010765565A CN 112019763 B CN112019763 B CN 112019763B
Authority
CN
China
Prior art keywords
value
brightness
long exposure
equal
exposure function
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
CN202010765565.4A
Other languages
Chinese (zh)
Other versions
CN112019763A (en
Inventor
胡泽
曾川峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Genius Technology Co Ltd
Original Assignee
Guangdong Genius Technology 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 Guangdong Genius Technology Co Ltd filed Critical Guangdong Genius Technology Co Ltd
Priority to CN202010765565.4A priority Critical patent/CN112019763B/en
Publication of CN112019763A publication Critical patent/CN112019763A/en
Application granted granted Critical
Publication of CN112019763B publication Critical patent/CN112019763B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time
    • 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/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes

Abstract

The embodiment of the application discloses a method for taking a picture in a dark environment and terminal equipment, which are applied to the technical field of terminal equipment and can solve the problems of high operation complexity and poor man-machine interaction performance of the terminal equipment when the terminal equipment takes a picture in a dark environment. The method comprises the following steps: acquiring a preview image, and detecting the brightness of the preview image to obtain a first brightness value; if the first brightness value is greater than or equal to the first brightness threshold value and less than or equal to the second brightness threshold value, adding 1 to the counter value; and if the counter value is equal to the second preset value and the long exposure function is in a closed state, starting the long exposure function and shooting an image.

Description

Photographing method and terminal equipment
Technical Field
The embodiment of the invention relates to the technical field of terminal equipment, in particular to a photographing method and terminal equipment.
Background
As telephone watches have become popular in the marketplace, users have placed increasing demands on the performance of telephone watches. When taking a picture in a dark environment, in order to improve the effect of taking the picture, a long exposure technology is used, and the scheme generally requires that a user selects a shooting option (for example, a night scene mode) corresponding to the long exposure technology in a shooting preview interface. On one hand, as the number of shooting options in the shooting preview interface is large, the user needs to search the option in the shooting preview interface, and shooting time is wasted in the process of searching the option; on the other hand, the telephone watch is usually a child, and when selecting among the shooting options in the shooting preview interface, it may not be possible to select the correct shooting option at a time. Therefore, when the terminal equipment shoots in a dark environment, the operation complexity is high, and the human-computer interaction performance of the terminal equipment is poor.
Disclosure of Invention
The embodiment of the invention provides a photographing method and terminal equipment, which are used for solving the problems that the terminal equipment is complex to operate and poor in man-machine interaction performance when photographing in a dark environment in the prior art. In order to solve the above technical problem, the embodiment of the present invention is implemented as follows:
in a first aspect, a photographing method is provided, the method including:
acquiring a preview image, and detecting the brightness of the preview image to obtain a first brightness value;
if the first brightness value is greater than or equal to the first brightness threshold value and less than or equal to the second brightness threshold value, adding 1 to the counter value;
and if the counter value is equal to the second preset value and the long exposure function is in a closed state, starting the long exposure function and shooting an image.
Optionally, if the first brightness value is greater than or equal to the first brightness threshold and less than or equal to the second brightness threshold, after the counter value is incremented by 1, the method further includes:
and if the counter value is not equal to the second preset value and the long exposure function is in the closed state, controlling the long exposure function to be in the closed state and shooting an image.
Optionally, after obtaining the first luminance value, the method further includes:
if the first brightness value is greater than or equal to a third brightness threshold value, subtracting 1 from the counter value, wherein the third brightness threshold value is greater than the second brightness threshold value;
and if the counter value is equal to the first preset value and the long exposure function is in an open state, closing the long exposure function and shooting an image, wherein the second preset value is larger than the first preset value.
Optionally, if the first brightness value is greater than or equal to the third brightness threshold, after the counter value is decreased by 1, the method further includes:
and if the counter value is not equal to the first preset value and the long exposure function is in the open state, controlling the long exposure function to be in the open state and shooting an image.
Optionally, after obtaining the first luminance value, the method further includes:
if the first brightness value is larger than the second brightness threshold and smaller than the third brightness threshold, the counter value is unchanged, and the long exposure function is kept unchanged.
In a second aspect, a terminal device is provided, which includes:
the acquisition module is used for acquiring a preview image and detecting the brightness of the preview image to obtain a first brightness value;
the processing module is used for adding 1 to the counter value if the first brightness value is greater than or equal to a first brightness threshold value and is less than or equal to a second brightness threshold value; and if the counter value is equal to the second preset value and the long exposure function is in a closed state, starting the long exposure function and shooting an image.
Optionally, the processing module is further configured to, if the first brightness value is greater than or equal to the first brightness threshold and is less than or equal to the second brightness threshold, add 1 to the counter value, and if the counter value is not equal to the second preset value and the long exposure function is in the off state, control the long exposure function to be in the off state and take an image.
Optionally, the processing module is further configured to subtract 1 from the counter value if the first brightness value is greater than or equal to a third brightness threshold, where the third brightness threshold is greater than the second brightness threshold;
and if the counter value is equal to the first preset value and the long exposure function is in an open state, closing the long exposure function and shooting an image, wherein the second preset value is larger than the first preset value.
Optionally, the processing module is further configured to, after the counter value is decreased by 1 if the first brightness value is greater than or equal to the third brightness threshold, control the long exposure function to be in an on state and capture an image if the counter value is not equal to the first preset value and the long exposure function is in the on state.
Optionally, the processing module is further configured to, after obtaining the first brightness value, if the first brightness value is greater than the second brightness threshold and smaller than the third brightness threshold, keep the counter value unchanged and keep the on-off state of the long exposure function unchanged.
In a third aspect, a terminal device is provided, including:
a memory storing executable program code;
a processor coupled to the memory;
the processor calls the executable program code stored in the memory to execute the shooting method in the first aspect of the embodiment of the present invention.
In a fourth aspect, there is provided a computer-readable storage medium storing a computer program that causes a computer to execute the photographing method in the first aspect of the embodiment of the invention. Computer-readable storage media include ROM/RAM, magnetic or optical disks, and the like.
In a fifth aspect, there is provided a computer program product for causing a computer to perform some or all of the steps of any one of the methods of the first aspect when the computer program product is run on the computer.
A sixth aspect provides an application publishing platform for publishing a computer program product, wherein the computer program product, when run on a computer, causes the computer to perform some or all of the steps of any one of the methods of the first aspect.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, the terminal equipment can automatically identify the brightness condition of the photographing environment and control the opening or closing of the long exposure function, so that the photographing effect of the terminal equipment in a dark environment is improved, the operation complexity of photographing the terminal equipment in the dark environment is reduced, and the human-computer interaction performance of the terminal equipment is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a first schematic flowchart of a photographing method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart diagram of a photographing method according to an embodiment of the present invention;
fig. 3 is a first schematic structural diagram of a terminal device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first" and "second," and the like, in the description and in the claims of the present invention are used for distinguishing between different objects and not for describing a particular order of the objects. For example, the first luminance threshold value and the second luminance threshold value, etc. are used to distinguish between different luminance threshold values, rather than to describe a particular order of luminance threshold values.
The terms "comprises," "comprising," and any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, in the embodiments of the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "e.g.," an embodiment of the present invention is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
The embodiment of the invention provides a photographing method and terminal equipment, which can solve the problems that a photographing terminal in the prior art cannot photograph in a dark environment or photographing operation is complex.
The terminal device according to the embodiment of the present invention may be an electronic device such as a Mobile phone, a tablet Computer, a notebook Computer, a palmtop Computer, a vehicle-mounted terminal device, a wearable device, an Ultra-Mobile Personal Computer (UMPC), a netbook, or a Personal Digital Assistant (PDA). The wearable device may be a smart watch, a smart bracelet, a watch phone, or the like, which is not limited in the embodiments of the present invention.
The executing subject of the photographing method provided by the embodiment of the present invention may be the terminal device, or may also be a functional module and/or a functional entity capable of implementing the photographing method in the terminal device, which may be specifically determined according to actual use requirements, and the embodiment of the present invention is not limited. The following takes a terminal device as an example to exemplarily explain the photographing method provided by the embodiment of the present invention.
The photographing method provided by the embodiment of the invention can be applied to a scene of photographing in a dark environment.
Example one
As shown in fig. 1, an embodiment of the present invention provides a photographing method, which may include the following steps:
101. and acquiring a preview image.
After the photographing application program is started, the camera starts to collect images of the photographing environment, and the obtained preview images are displayed in a photographing preview interface displayed by the terminal equipment.
In the embodiment of the invention, the acquired preview image is not stored in the terminal equipment, so that the memory of the terminal equipment is not occupied, and the preview image can be used for detecting the brightness of the photographing environment in the subsequent steps.
Optionally, the higher the speed at which the camera of the terminal device acquires the preview image is, the shorter the reaction time that the terminal device automatically adjusts to the photographing mode matched with the current photographing environment when photographing in a dark environment (for example, when it is determined that the photographing environment is dark according to the brightness of the preview image, the photographing mode of the terminal device is adjusted to start the long exposure function) is.
102. And detecting the brightness of the preview image to obtain a first brightness value.
In the embodiment of the invention, the first brightness value can be obtained by averaging the brightness values of the preview image. Optionally, the brightness value of each pixel point in the preview image may be calculated first, then the natural logarithm of the brightness value of each pixel point is calculated, then an average value is obtained according to the natural logarithms of the brightness values of all the pixel points, and finally a natural index value is obtained for the average value, where the natural index value is the average brightness value of the preview image, that is, the first brightness value.
Optionally, an image brightness sensor may be disposed in the terminal device, after the preview image is obtained, the image brightness sensor may convert the brightness value of each pixel point in the preview image into a current value of a certain size, the current value is used to represent the brightness value of each pixel point in the preview image, and the current value is converted into the brightness value according to a conversion relationship between the prestored brightness value and the current value, so as to obtain the brightness value of each pixel point.
Further, the brightness value of the preview image (i.e., the first brightness value) may be calculated according to the brightness value of each pixel obtained through conversion.
Steps 103 and 104 may be continued after the first luminance value is obtained in 102.
103. And if the first brightness value is greater than or equal to the first brightness threshold value and less than or equal to the second brightness threshold value, adding 1 to the counter value.
In the embodiment of the present invention, the first luminance threshold, the second luminance threshold, and the third luminance threshold are involved, and the fact is that the luminance range is divided by using these thresholds, and specific values of the first luminance threshold, the second luminance threshold, and the third luminance threshold may be set according to actual requirements, which is not limited in the embodiment of the present invention.
In the embodiment of the present invention, the divided luminance ranges may include the following luminance ranges:
the first method comprises the following steps: less than the first brightness threshold.
Alternatively, the first brightness threshold may be set to 0, or, 1, etc.
Illustratively, the first brightness threshold is a certain brightness value close to 0, and may be a lower limit value of the brightness that the terminal device can detect from the preview image, and when the first brightness value is smaller than the first brightness threshold, it indicates that the photographing environment is very dark, and the terminal device may not be able to accurately detect the brightness value.
Optionally, in practical application, the brightness detection accuracy may be set according to the limitation of the device hardware, where the brightness detection accuracy can be supported by the device hardware.
When it is detected that the brightness value (i.e., the first brightness value) in the preview image belongs to the first range, the terminal device considers that the environment may not be suitable for taking a picture, and at this time, the on/off of the long exposure function may not be adjusted.
And the second method comprises the following steps: greater than or equal to the first brightness threshold and less than or equal to the second brightness threshold.
Wherein the second brightness threshold is greater than the first brightness threshold.
Optionally, in practical application, the brightness detection accuracy may be set according to the limitation of the device hardware, where the brightness detection accuracy can be supported by the device hardware.
Alternatively, the second brightness threshold may be set to 5, or 6, etc. The second brightness threshold may be an upper limit value of a brightness value of a dark environment recognized by the terminal device.
When detecting that the brightness value (i.e. the first brightness value) in the preview image belongs to the second range, the terminal device considers that the environment belongs to a darker environment, and when taking a picture, the long exposure function needs to be adjusted to be in an on state.
And the third is that: greater than the second brightness threshold and less than or equal to the third brightness threshold.
Wherein the third brightness threshold is greater than the second brightness threshold.
Alternatively, the third brightness threshold may be set to 15, or, 16, etc. The third brightness threshold may be a lower limit value of the brightness of the bright environment recognized by the terminal device.
When the brightness value (namely the first brightness value) in the preview image is detected to belong to the second range, the terminal device considers that the environment belongs to an environment with moderate brightness, at this moment, the long exposure function is started, or the long exposure function is closed, so that the influence on the display effect of the photographed image is small, and the on/off state of the long exposure function does not need to be adjusted when photographing is performed.
And fourthly: greater than the third brightness threshold.
When detecting that the brightness value (i.e. the first brightness value) in the preview image belongs to the third range, the terminal device considers that the environment belongs to a brighter environment, and when taking a picture, the long exposure function needs to be adjusted to be in an off state.
It can be seen that the three luminance ranges are divided according to the luminance from small to large.
The first luminance value in the above 103 satisfies the above first case, in which case the following 104 may be continuously performed.
104. And if the counter value is equal to the second preset value and the long exposure function is in a closed state, starting the long exposure function.
In the embodiment of the invention, the first preset value and the second preset value are involved, and the value range of the counter value is divided by adopting the preset values. The specific values of the first preset value and the second preset value may be set according to actual requirements, and the embodiment of the present invention is not limited.
In the embodiment of the invention, the value range of the counter value is as follows: greater than or equal to a first preset value and less than or equal to a second preset value. And the second preset value is larger than the first preset value, and the counter value is an integer.
In the embodiment of the present invention, the value of the counter value may include the following cases:
the first type: the total number of counter values equals the first preset value.
Optionally, when the value of the counter value is the first type, the long exposure function is turned off (that is, if the counter value is originally in a state of turning on the long exposure function, the state is switched to a state of turning off the long exposure function, and if the counter value is originally in a state of turning off the long exposure function, the state is kept unchanged).
Alternatively, the first preset value may be a lower boundary value of the range of the counter values, that is, the counter value does not continue to decrease after the total number of counters decreases to the first preset value. The first preset value may be set to 0 or 1, etc.
The second type: the total number of the counter values is larger than a first preset value and smaller than a second preset value.
Optionally, when the value of the counter value is the second type of condition, the state of the original long exposure function is maintained.
In the third category: the total number of counter values equals the second preset value.
Optionally, when the value of the counter value is the third type of condition, the long exposure function is turned on (i.e., if the counter value is originally in a state of turning off the long exposure function, the state is switched to a state of turning on the long exposure function, and if the counter value is originally in a state of turning on the long exposure function, the state is kept unchanged).
Alternatively, the second preset value may be an upper boundary value of the range of counter values, and the first preset value may be set to 5.
In the embodiment of the present invention, the technical manner of the counter is different according to the difference of the brightness range of the brightness value, and specifically, the following manners may be provided:
(1) if the first brightness value belongs to the second brightness range and the total value of the counter belongs to the second class and the first class, the counter value is increased by 1.
(2) If the first brightness value belongs to the second brightness range and the total counter value belongs to the third category, the counter value remains unchanged.
(3) If the first brightness value belongs to the first brightness range or the third brightness range, the counter remains unchanged.
(4) If the first brightness value belongs to the fourth brightness range and the total value of the counter belongs to the second and third types, the counter value is decreased by 1.
(5) And if the first brightness value belongs to the fourth brightness range and the total value of the counter belongs to the first class condition, adding 1 to the counter value.
In the embodiment of the invention, the higher the speed of acquiring the preview image by the terminal equipment, the shorter the time for processing one frame of preview image, and under the condition of determining the value range of the preset value, the higher the speed of acquiring the preview image by the terminal equipment, the shorter the reaction time of the terminal equipment; under the condition that the speed of acquiring the preview image by the terminal device is constant, if the value range of the preset value is smaller, that is, the difference between the first preset value and the second preset value is smaller, the preview image which needs to be processed when the long exposure function is automatically opened by the photographing method in the embodiment of the present invention is smaller, the response time for executing the automatic opening or closing of the long exposure function is shortened, but the value range of the preset value is smaller, which also means that the instability for executing the automatic opening or closing of the long exposure function is increased, and the situation that the photographing mode is frequently switched occurs in the photographing environment with frequent brightness change.
Illustratively, the value range of the counter is set to 0 to 5, and if the user enters an obviously darker environment for taking a picture, the brightness value of the preview image at this time belongs to the second brightness range, and the value of the counter belongs to the first type or the second type, the value of the counter is increased by 1 every time the terminal device processes one frame of image, by adopting the shooting method in the embodiment of the present invention, the long exposure algorithm can be started up when at most 5 frames of images need to be processed. However, if the counter is set to a value ranging from 0 to 10 in the same terminal device, the number of processing tasks increases and the response time increases in the same case. Compared with two methods for setting the value range of the counter, the former method has a sensitive response speed compared with the latter method, but in a photographing environment with frequent brightness change, the former method can cause the situation that the long exposure function is frequently turned on/off. The setting of the value range of the counter can be set based on at least one of the requirements of the reaction sensitivity and the functional stability.
In the embodiment of the invention, the terminal equipment acquires the preview image of the external environment, determines the brightness of the photographing environment by detecting the brightness value of the preview image, and automatically controls the long exposure function to be started when the photographing environment is determined to be dark, so that a user does not need to select a night scene mode and other photographing modes in a photographing preview interface for photographing, the operation of the user can be simplified, and the human-computer interaction performance of the terminal equipment is improved.
Alternatively, after the long exposure function is turned on, a prompt message for informing the user that the long exposure function has been turned on/off may be output.
In the embodiment of the invention, different photographing modes can be set, the night scene mode is set after the long exposure function is started, and the standard mode is set when the long exposure function is not started.
The prompt message can be in the form of voice, text, animation, etc., such as playing voice "the current shooting mode at night! "; after turning off the long exposure algorithm, a voice "currently standard mode! ".
In the embodiment of the invention, the terminal equipment acquires the preview image of the external environment, determines the brightness of the photographing environment by detecting the brightness value of the preview image, and automatically controls the long exposure function to be started when the photographing environment is determined to be dark, so that a user does not need to select a night scene mode and other photographing modes in a photographing preview interface for photographing, the operation of the user can be simplified, and the human-computer interaction performance of the terminal equipment is improved. The user can be prompted to start the long exposure function by outputting prompt information, and the requirement that the user takes pictures in a dark environment is met. The man-machine interaction performance of the terminal equipment can be further improved.
Example two
As shown in fig. 2, an embodiment of the present invention provides a photographing method, which may include the following steps:
201. and acquiring a preview image.
202. And detecting the brightness of the preview image to obtain a first brightness value.
For the descriptions 201 and 202, reference may be made to the related descriptions of 101 and 102 in the first embodiment, and further description is omitted here for avoiding repetition.
After 202, it can be determined in which brightness range the first brightness value is in according to the obtained first brightness value. That is, after 202, 203 to 207 may be performed; alternatively, after 202, 208 to 210, 206 and 207 are performed; alternatively, 211, 206, and 207 may be performed after 202.
203. The first luminance value is greater than or equal to a first luminance threshold value and less than or equal to a second luminance threshold value.
The above 203 corresponds to the second luminance range in the first embodiment.
If the first brightness value is greater than or equal to the first brightness threshold and less than or equal to the second brightness threshold, and the total number of the current counters takes on the second and first conditions shown in the first embodiment, then 204 to 205 are executed; if the total number of counters currently takes on values belonging to the third category of cases as shown in the first embodiment, 206 and 207 are executed.
204. The counter value is incremented by 1.
205. And if the counter value is equal to the second preset value and the long exposure function is in a closed state, starting the long exposure function and shooting an image.
Optionally, if the counter value is not equal to the second preset value and the long exposure function is in the off state, controlling the long exposure function to keep the off state and shooting the image.
206. The counter value is unchanged.
If the counter value has been equal to the second preset value (i.e., the third case described above) before execution 203, the second preset value is maintained.
207. The long exposure function is maintained in its original state.
In the embodiment of the invention, when the shooting environment is judged to be in a dark environment according to the brightness of the preview image, the long exposure can be automatically started so as to improve the shooting effect.
208. The first luminance value is greater than the third luminance threshold.
The above-mentioned reference numeral 208 corresponds to the fourth luminance range in the first embodiment.
If the first brightness value is greater than the third brightness threshold and the total number of the current counters belongs to the second or third case shown in the first embodiment, step 209 is executed.
209. The counter value is decremented by 1.
210. And if the counter value is equal to the first preset value and the long exposure function is in an open state, closing the long exposure function and shooting an image.
Optionally, if the counter value is not equal to the first preset value and the long exposure function is in the off state, controlling the long exposure function to keep the off state and shooting the image. That is, after 210, execution 206 and 207 may continue.
According to the embodiment of the invention, when the shooting environment is judged to be too bright according to the brightness of the preview image, the long exposure can be automatically closed so as to improve the shooting effect.
211. The first brightness value is greater than the second brightness threshold and less than the third brightness threshold, or the first brightness value is less than the first brightness threshold.
The above 211 corresponds to the first and third luminance ranges in the first embodiment.
If the first brightness value is greater than the second brightness threshold and less than the third brightness threshold, or the first brightness value is less than the first brightness threshold, and the value of the total number of the current counters belongs to the first type of situation, the second type of situation, or the third type of situation shown in the first embodiment, 206 and 207 are executed.
According to the embodiment of the invention, when the shooting environment is judged to be at the proper brightness according to the brightness of the preview image, the long exposure function can be kept unchanged, so that the shooting effect is improved.
The method provided by the embodiment of the invention also comprises the following steps:
optionally, data such as the use frequency, the use times, the use duration and the like of the long exposure mode of the terminal device user are recorded, the long exposure function starting algorithm can be adjusted according to the use habits of the user, and the range of the counter value can be dynamically allocated. Illustratively, the terminal device determines that the user has a strong dependency on the long exposure function according to the recorded usage data of the user on the long exposure function, in this case, if the long exposure function is in an off state, and when the counter value starts to increase, the terminal device controls to decrease the first preset value by a certain value, so as to start the long exposure algorithm more quickly; when the long exposure function is in an open state and the counter value is reduced, the first preset value is increased by a certain value, so that the long exposure function can be closed more quickly.
As an optional implementation manner, after receiving the photographing instruction, the photographing apparatus may run an algorithm for automatically controlling the long exposure function, determine an appropriate photographing mode, and then execute the photographing instruction.
As an optional implementation manner, the control algorithm may be run after the user starts the photographing function, and after the appropriate photographing mode is confirmed, the user is prompted to operate to photograph.
In the embodiment of the invention, the terminal equipment can acquire the preview image of the photographing environment, detect the brightness value of the preview image of the photographing environment, and then infer the brightness change of the photographing environment according to the change of the brightness value of the preview image of the photographing environment, and the terminal equipment can automatically turn on/off the long exposure function according to the brightness change of the photographing environment, so that the complexity of photographing operation in a dark environment is reduced, the photographing equipment can complete the photographing function in a dark environment, and the human-computer interaction performance of the terminal equipment is effectively improved.
EXAMPLE III
As shown in fig. 3, an embodiment of the present invention provides a terminal device, where the terminal device includes:
an obtaining module 301, configured to obtain a preview image, and detect brightness of the preview image to obtain a first brightness value;
the processing module 302, if the first brightness value is greater than or equal to the first brightness threshold and less than or equal to the second brightness threshold, then the counter value is increased by 1; and if the counter value is equal to the first preset value and the long exposure function is in a closed state, starting the long exposure function and shooting an image.
Optionally, the processing module 302 is further configured to add 1 to the counter value if the first brightness value is greater than or equal to the first brightness threshold and is less than or equal to the second brightness threshold, and control the long exposure function to be in the off state and take the image if the counter value is not equal to the first preset value and the long exposure function is in the off state.
Optionally, the processing module 302 is further configured to subtract 1 from the counter value if the first brightness value is greater than or equal to a third brightness threshold, where the third brightness threshold is greater than the second brightness threshold;
and if the counter value is equal to the first preset value and the long exposure function is in an open state, closing the long exposure function and shooting an image, wherein the second preset value is larger than the first preset value.
Optionally, the processing module 302 is further configured to, after subtracting 1 from the counter value if the first brightness value is greater than or equal to the third brightness threshold, control the long exposure function to be in an on state and capture an image if the counter value is not equal to the first preset value and the long exposure function is in the on state.
Optionally, the processing module 302 is further configured to, after obtaining the first brightness value, if the first brightness value is greater than the second brightness threshold and smaller than the third brightness threshold, keep the counter value unchanged and keep the on-off state of the long exposure function unchanged.
The terminal device provided by the embodiment of the present invention may include:
a memory storing executable program code;
a processor coupled to the memory;
the processor calls the executable program codes stored in the memory to execute the method executed by the terminal equipment in each method embodiment.
Fig. 4 is a schematic diagram of a hardware structure of a terminal device for implementing various embodiments of the present invention, where the terminal device includes but is not limited to: a Radio Frequency (RF) circuit 401, a memory 402, an input unit 403, a display unit 404, a sensor 405, an audio circuit 406, a wireless fidelity (WiFi) module 407, a processor 408, a power supply 409, a camera 410, and the like. Therein, the radio frequency circuit 401 includes a receiver 4011 and a transmitter 4012. Those skilled in the art will appreciate that the terminal device configuration shown in fig. 4 does not constitute a limitation of the terminal device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The RF circuit 401 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, receives downlink information of a base station and then sends the received downlink information to the processor 408 for processing; in addition, the data for designing uplink is transmitted to the base station. In general, the RF circuit 401 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuitry 401 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to global system for mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Message Service (SMS), etc.
The memory 402 may be used to store software programs and modules, and the processor 408 executes various functional applications and data processing of the terminal device by operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal device, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 403 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal device. Specifically, the input unit 403 may include a touch panel 4031 and other input devices 4032. Touch panel 4031, also referred to as a touch screen, can collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 4031 using any suitable object or accessory such as a finger, stylus, etc.) and drive the corresponding connected devices according to a predetermined program. Alternatively, the touch panel 4031 may include two portions, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts it to touch point coordinates, and sends the touch point coordinates to the processor 408, and can receive and execute commands from the processor 408. In addition, the touch panel 4031 can be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 403 may include other input devices 4032 in addition to the touch panel 4031. In particular, other input devices 4032 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 404 may be used to display information input by the user or information provided to the user and various menus of the terminal device. The display unit 404 may include a display panel 4041, and optionally, the display panel 4041 may be configured in the form of a Liquid Crystal Display (LCD), an organic light-Emitting diode (OLED), or the like. Further, touch panel 4031 can overlay display panel 4041 and, when touch panel 4031 detects a touch operation thereon or nearby, communicate to processor 408 to determine a touch event, and then processor 408 provides a corresponding visual output on display panel 4041 in accordance with the touch event. Although in fig. 4, touch panel 4031 and display panel 4041 are shown as two separate components to implement input and output functions of the terminal device, in some embodiments, touch panel 4031 may be integrated with display panel 4041 to implement input and output functions of the terminal device.
The terminal device may also include at least one sensor 405, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 4041 according to the brightness of ambient light, and a proximity sensor that exits the display panel 4041 and/or the backlight when the terminal device is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration) for recognizing the attitude of the terminal device, and related functions (such as pedometer and tapping) for vibration recognition; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal device, detailed description is omitted here. In the embodiment of the present invention, the terminal device may include an acceleration sensor, a depth sensor, a distance sensor, or the like.
The audio circuitry 406, speaker 4061, microphone 4062 may provide an audio interface between the user and the terminal device. The audio circuit 406 may transmit the electrical signal converted from the received audio data to the speaker 4061, and convert the electrical signal into a sound signal by the speaker 4061 and output the sound signal; on the other hand, the microphone 4062 converts the collected sound signal into an electric signal, converts the electric signal into audio data after being received by the audio circuit 406, and outputs the audio data to the processor 408 for processing, for example, to another terminal device via the RF circuit 401, or outputs the audio data to the memory 402 for further processing.
WiFi belongs to short distance wireless transmission technology, and the terminal device can help the user send and receive e-mail, browse web page and access streaming media etc. through WiFi module 407, which provides wireless broadband internet access for the user. Although fig. 4 shows the WiFi module 407, it is understood that it does not belong to the essential constitution of the terminal device, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 408 is a control center of the terminal device, connects various parts of the entire terminal device by various interfaces and lines, and performs various functions of the terminal device and processes data by running or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the terminal device. Alternatively, processor 408 may include one or more processing units; preferably, the processor 408 may integrate an application processor, which handles primarily the operating system, user interface, applications, etc., and a modem processor, which handles primarily the wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 408.
The terminal device also includes a power source 409 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 408 via a power management system to manage charging, discharging, and power consumption management functions via the power management system. Although not shown, the terminal device may further include a bluetooth module or the like, which is not described in detail herein.
In the embodiment of the present invention, the processor 408 is configured to obtain a preview image, and detect the brightness of the preview image to obtain a first brightness value; if the first brightness value is greater than or equal to the first brightness threshold value and less than or equal to the second brightness threshold value, adding 1 to the counter value; and if the counter value is equal to the first preset value and the long exposure function is in a closed state, starting the long exposure function and shooting an image.
Optionally, the processor 408 is further configured to, if the first brightness value is greater than or equal to the first brightness threshold and is less than or equal to the second brightness threshold, add 1 to the counter value, and if the counter value is not equal to the first preset value and the long exposure function is in the off state, control the long exposure function to be in the off state and take an image.
Optionally, the processor 408 is further configured to subtract 1 from the counter value if the first brightness value is greater than or equal to a third brightness threshold value, where the third brightness threshold value is greater than the second brightness threshold value;
and if the counter value is equal to the first preset value and the long exposure function is in an open state, closing the long exposure function and shooting an image, wherein the second preset value is larger than the first preset value.
Optionally, the processor 408 is further configured to, after the counter value is decreased by 1 if the first brightness value is greater than or equal to the third brightness threshold, control the long exposure function to be in an on state and capture an image if the counter value is not equal to the first preset value and the long exposure function is in the on state.
Optionally, the processor 408 is further configured to, after obtaining the first brightness value, if the first brightness value is greater than the second brightness threshold and smaller than the third brightness threshold, keep the counter value unchanged and keep the on-off state of the long exposure function unchanged.
Embodiments of the present invention provide a computer-readable storage medium storing a computer program, wherein the computer program causes a computer to execute some or all of the steps of the method as in the above method embodiments.
Embodiments of the present invention also provide a computer program product, wherein the computer program product, when run on a computer, causes the computer to perform some or all of the steps of the method as in the above method embodiments.
Embodiments of the present invention further provide an application publishing platform, where the application publishing platform is configured to publish a computer program product, where the computer program product, when running on a computer, causes the computer to perform some or all of the steps of the method in the above method embodiments.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. Those skilled in the art should also appreciate that the embodiments described in this specification are exemplary and alternative embodiments, and that the acts and modules illustrated are not required in order to practice the invention.
The terminal device provided by the embodiment of the present invention can implement each process shown in the above method embodiments, and is not described herein again to avoid repetition.
In various embodiments of the present invention, it should be understood that the sequence numbers of the above-mentioned processes do not imply an inevitable order of execution, and the execution order of the processes should be determined by their functions and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated units, if implemented as software functional units and sold or used as a stand-alone product, may be stored in a computer accessible memory. Based on such understanding, the technical solution of the present invention, which is a part of or contributes to the prior art in essence, or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several requests for causing a computer device (which may be a personal computer, a server, a network device, or the like, and may specifically be a processor in the computer device) to execute part or all of the steps of the above-described method of each embodiment of the present invention.
It will be understood by those skilled in the art that all or part of the steps in the methods of the embodiments described above may be implemented by hardware instructions of a program, and the program may be stored in a computer-readable storage medium, where the storage medium includes Read-Only Memory (ROM), Random Access Memory (RAM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), One-time Programmable Read-Only Memory (OTPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM), or other Memory, such as a magnetic disk, or a combination thereof, A tape memory, or any other medium readable by a computer that can be used to carry or store data.

Claims (9)

1. A method of taking a picture, the method comprising:
acquiring a preview image, and detecting the brightness of the preview image to obtain a first brightness value;
if the first brightness value is greater than or equal to a first brightness threshold value and less than or equal to a second brightness threshold value, adding 1 to the counter value; if the counter value is equal to a second preset value and the long exposure function is in a closed state, starting the long exposure function and shooting an image;
if the first brightness value is greater than or equal to a third brightness threshold value, subtracting 1 from the counter value, wherein the third brightness threshold value is greater than the second brightness threshold value; if the counter value is equal to a first preset value and the long exposure function is in an open state, the long exposure function is closed and an image is shot, wherein the second preset value is larger than the first preset value.
2. The method of claim 1, wherein if the first brightness value is greater than or equal to a first brightness threshold and less than or equal to a second brightness threshold, the method further comprises, after adding 1 to a counter value:
and if the counter value is not equal to the second preset value and the long exposure function is in a closed state, controlling the long exposure function to be in the closed state and shooting an image.
3. The method of claim 1, wherein if the first brightness value is greater than or equal to a third brightness threshold, after subtracting 1 from the counter value, the method further comprises:
and if the counter value is not equal to the first preset value and the long exposure function is in an open state, controlling the long exposure function to be in the open state and shooting an image.
4. The method of claim 1, wherein after obtaining the first luminance value, further comprising:
if the first brightness value is larger than the second brightness threshold and smaller than the third brightness threshold, the counter value is unchanged, and the long exposure function remains unchanged.
5. A terminal device, comprising:
the acquisition module is used for acquiring a preview image and detecting the brightness of the preview image to obtain a first brightness value;
the processing module is used for adding 1 to the counter value if the first brightness value is greater than or equal to a first brightness threshold value and is less than or equal to a second brightness threshold value; if the counter value is equal to a second preset value and the long exposure function is in a closed state, starting the long exposure function and shooting an image;
the processing module is further configured to subtract 1 from the counter value if the first brightness value is greater than or equal to a third brightness threshold, where the third brightness threshold is greater than the second brightness threshold; if the counter value is equal to a first preset value and the long exposure function is in an open state, the long exposure function is closed and an image is shot, wherein the second preset value is larger than the first preset value.
6. The terminal device according to claim 5, wherein the processing module is further configured to, after the counter value is increased by 1 if the first brightness value is greater than or equal to a first brightness threshold and less than or equal to a second brightness threshold, control the long exposure function to be in an off state and capture an image if the counter value is not equal to the second preset value and the long exposure function is in the off state.
7. The terminal device according to claim 5, wherein the processing module is further configured to, after the counter value is decreased by 1 if the first brightness value is greater than or equal to a third brightness threshold, control the long exposure function to be in an on state and capture an image if the counter value is not equal to the first preset value and the long exposure function is in the on state.
8. The apparatus according to claim 5, wherein the processing module is further configured to, after the obtaining of the first brightness value, if the first brightness value is greater than the second brightness threshold and smaller than the third brightness threshold, keep the counter value unchanged and keep the on/off state of the long exposure function unchanged.
9. A computer-readable storage medium characterized in that the computer-readable storage medium stores a computer program that causes a computer to execute the photographing method according to any one of claims 1 to 4.
CN202010765565.4A 2020-07-31 2020-07-31 Photographing method and terminal equipment Active CN112019763B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010765565.4A CN112019763B (en) 2020-07-31 2020-07-31 Photographing method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010765565.4A CN112019763B (en) 2020-07-31 2020-07-31 Photographing method and terminal equipment

Publications (2)

Publication Number Publication Date
CN112019763A CN112019763A (en) 2020-12-01
CN112019763B true CN112019763B (en) 2021-12-21

Family

ID=73499053

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010765565.4A Active CN112019763B (en) 2020-07-31 2020-07-31 Photographing method and terminal equipment

Country Status (1)

Country Link
CN (1) CN112019763B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1734343A (en) * 2004-07-06 2006-02-15 Lg电子株式会社 Method and apparatus for adjusting exposure for a camera in a mobile phone
JP2014197787A (en) * 2013-03-29 2014-10-16 株式会社メガチップス Monitor camera device
CN107026967A (en) * 2016-02-01 2017-08-08 杭州海康威视数字技术股份有限公司 A kind of camera operation mode switching method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI472989B (en) * 2012-12-04 2015-02-11 Pixart Imaging Inc Image adjusting method and optical navigating apparatus utlizing the image adjusting method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1734343A (en) * 2004-07-06 2006-02-15 Lg电子株式会社 Method and apparatus for adjusting exposure for a camera in a mobile phone
JP2014197787A (en) * 2013-03-29 2014-10-16 株式会社メガチップス Monitor camera device
CN107026967A (en) * 2016-02-01 2017-08-08 杭州海康威视数字技术股份有限公司 A kind of camera operation mode switching method and device

Also Published As

Publication number Publication date
CN112019763A (en) 2020-12-01

Similar Documents

Publication Publication Date Title
CN110139262B (en) Bluetooth communication control method and related product
CN108845853B (en) Application program starting method and mobile terminal
CN107943374B (en) Method for starting application program in foldable terminal and foldable terminal
CN108334272B (en) Control method and mobile terminal
CN108307106B (en) Image processing method and device and mobile terminal
CN106445596B (en) Method and device for managing setting items
CN107241552B (en) Image acquisition method, device, storage medium and terminal
CN107888765B (en) Method for switching scene mode and mobile terminal
CN108762814B (en) Screen lightening method and related equipment
CN107317918B (en) Parameter setting method and related product
CN108718389B (en) Shooting mode selection method and mobile terminal
CN108984066B (en) Application icon display method and mobile terminal
CN108762613B (en) State icon display method and mobile terminal
CN108549660B (en) Information pushing method and device
US11915633B2 (en) Screen color temperature control method, apparatus, storage medium, and mobile terminal
CN107967418B (en) Face recognition method and mobile terminal
CN107800869B (en) Split screen display method, mobile terminal and storage medium
CN107832067B (en) Application updating method, mobile terminal and computer readable storage medium
CN110418003B (en) Brightness adjusting method, brightness adjusting device and mobile terminal
CN108351741B (en) Method for adjusting screen-on duration of terminal and terminal
CN107885423B (en) Picture processing method and mobile terminal
CN109561255B (en) Terminal photographing method and device and storage medium
CN108924413B (en) Shooting method and mobile terminal
CN107770449B (en) Continuous shooting method, electronic device and storage medium
CN107040658B (en) Mobile terminal and method and device for controlling screen thereof

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