Capturing method, electronic device, readable storage medium, and program product
By adjusting the frame rate in low-light scenes to improve the smoothness and quality of electronic device display, the problem of frame rate reduction caused by scaling operations in low-light scenes is solved, achieving smooth display and image quality at high frame rates.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2026-04-02
AI Technical Summary
In low-light conditions, the reduced frame rate during zooming on electronic devices causes stuttering in the captured images, affecting smoothness and quality.
By detecting the user's zooming operation in low-light scenes, the frame rate is adjusted to the target frame rate to ensure that the frame rate is higher than the initial frame rate and the exposure remains unchanged within a certain range, so as to improve the smoothness and quality of display.
It improves the smoothness and quality of images captured in low-light scenes, avoids stuttering caused by reduced frame rate, and maintains image brightness.
Smart Images

Figure CN2025091441_02042026_PF_FP_ABST
Abstract
Description
Photographing method, electronic device, readable storage medium and program product
[0001] The present application claims priority to the Chinese patent application No. 202411039649.4, filed on July 31, 2024, and entitled "Photographing method, electronic device, readable storage medium and program product", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present application relates to the field of photographing technology, and in particular, to a photographing method, an electronic device, a readable storage medium and a program product. BACKGROUND
[0003] When an electronic device (such as a mobile phone, a tablet computer, etc.) photographs through a photographing application (such as a camera application), a photographing preview picture is displayed. In addition, a user can perform a zoom operation on a photographed image by adjusting a zoom ratio in the photographing preview picture to meet different preview requirements of the user.
[0004] If the user performs the zoom operation on the photographed image in a dark environment, i.e., a dark light scene, the electronic device usually increases an exposure time by reducing a frame rate during camera preview to make the imaging brightness of the photographed image in the dark light scene stronger, thereby improving the display quality of the photographed image.
[0005] However, in the zoom operation process, the photographing preview picture needs to display photographed images of multiple zoom ratios in a unit time, resulting in a high frame rate required during preview. Therefore, if the electronic device reduces the frame rate in the dark light scene, the reduced frame rate may not meet the high frame rate requirement in the zoom operation, resulting in a lag when the photographed image is switched and reducing the display fluency of the photographed image. SUMMARY
[0006] Embodiments of the present application provide a photographing method, an electronic device, a readable storage medium and a program product. The method can increase the display frame rate of the photographed image, thereby increasing the display fluency of the photographed image during zooming in a dark light scene.
[0007] In a first aspect, the present application provides a photographing method, which is applied to an electronic device, and the method comprises: displaying a photographing preview picture; detecting a zoom operation of a user; determining whether a current photographing illumination condition meets an adjustment condition; and when the current photographing illumination condition meets the adjustment condition, displaying a zoomed photographing preview picture at a target frame rate, the target frame rate being greater than a first frame rate, and the first frame rate being a frame rate determined by the electronic device based on an exposure time under the current photographing illumination condition.
[0008] The adjustment condition may include, for example, an adjustment condition corresponding to a dark-light scene. In this case, the adjustment condition may include that the light intensity in the current shooting light condition is less than a preset light intensity threshold. That is, if the light intensity satisfies the adjustment condition of being less than the preset light intensity threshold, the electronic device may determine that the current scene is a dark-light scene.
[0009] Further, if the electronic device detects the zoom operation of the user in the dark-light scene, the shooting preview image can be displayed at a target frame rate that is greater than the first lower limit value and greater than the first frame rate determined based on the current shooting light condition. Compared with the way of displaying the shooting preview image based on the first frame rate or based on the first lower limit value in some embodiments, the display frame rate of the shooting preview image in this method is higher, and the display fluency of the shooting preview image can be improved.
[0010] In a possible implementation of the first aspect, displaying the zoomed shooting preview image at the target frame rate includes: adjusting a preset frame rate range lower limit value of the electronic device to a second lower limit value, where the second lower limit value is greater than the first lower limit value; detecting that the first frame rate is less than the second lower limit value, taking the second lower limit value as the target frame rate, and displaying the zoomed shooting preview image at the target frame rate.
[0011] In this way, after the electronic device detects the zoom operation of the user in the dark-light scene, the first lower limit value can be increased to the second lower limit value, and in the case where the first frame rate calculated based on the current shooting light condition is less than the second lower limit value, the second lower limit value is taken as the target frame rate, and the shooting preview image is displayed at the target frame rate. Compared with the way of displaying the shooting preview image at the first lower limit value when the first frame rate is less than the first lower limit value, the target frame rate in this method is greater than the first lower limit value, so that the display frame rate of the shooting preview image is higher, and the display fluency is also stronger.
[0012] In a possible implementation of the first aspect, displaying the zoomed shooting preview image at the target frame rate includes: detecting that the first frame rate is less than a preset frame rate range first lower limit value of the electronic device, and displaying the zoomed shooting preview image at a target frame rate greater than the first lower limit value.
[0013] In this way, after the electronic device detects the zoom operation of the user in the dark-light scene, the first frame rate can be determined first, and if the first frame rate is less than the first lower limit value, the shooting preview image is displayed at a target frame rate greater than the first frame rate and the first lower limit value. Compared with the way of displaying the shooting preview image at the first lower limit value when the first frame rate is less than the first lower limit value, the target frame rate in this method is greater than the first lower limit value, so that the display frame rate of the shooting preview image is higher, and the display fluency is also stronger.
[0014] In a possible implementation of the first aspect, the method further includes: detecting that the first frame rate is greater than or equal to the first lower limit value, and the first frame rate is less than an average of the first lower limit value and a first upper limit value of the preset frame rate range, and taking the average as the target frame rate, and displaying the scaled shooting preview screen at the target frame rate.
[0015] In this manner, if the electronic device determines that the first frame rate is greater than or equal to the first lower limit value, it further determines whether the first frame rate is less than an average of the first lower limit value and the second lower limit value. If so, the average is taken as the target frame rate. Compared with the manner of displaying the shooting preview screen at the first frame rate when the first frame rate is greater than or equal to the first lower limit value, the target frame rate in this method is greater than the first frame rate, so that the display frame rate of the shooting preview screen is higher, and the display fluency is also stronger.
[0016] In a possible implementation of the first aspect, the target frame rate is less than or equal to the first upper limit value of the preset frame rate range of the electronic device.
[0017] It can be understood that if the target frame rate is too large, for example, greater than the first upper limit value of the preset frame rate range, the shooting preview screen displayed at the target frame rate will have more noise, making the shooting preview screen look rough and distorted, and thus affecting the quality of the shooting preview screen. Therefore, in order to ensure the quality of the shooting preview screen, the target frame rate can be less than or equal to the first upper limit value of the preset frame rate range, so as to ensure the quality of the shooting preview screen.
[0018] In a possible implementation of the first aspect, the shooting preview screen displays a shooting image, and detecting the zoom operation of the user includes: detecting a sliding operation of the user on a zoom control in the shooting preview screen; or, detecting a zoom operation of the user on the shooting image by using two fingers; or, detecting a long-press operation of the user on a first key on the electronic device.
[0019] The zoom control can be, for example, the zoom bar 102 in FIG. 1, so that the sliding operation of the user on the zoom control in the shooting preview screen is the sliding operation of the user on the zoom bar 102 in FIG. 1. In addition, a schematic diagram of the zoom operation of the user on the shooting image by using two fingers can be referred to FIG. 5. The long-press operation of the user on the first key on the electronic device can be understood as the zoom operation of the user on the shooting image by long-pressing the key 104 in FIG. 5.
[0020] In a possible implementation of the first aspect, the method further includes: determining an exposure time corresponding to the target frame rate, the exposure time and the target frame rate being inversely proportional to each other; determining a gain based on an exposure amount corresponding to a current shooting illumination condition and the exposure time; and performing shooting based on the exposure time and the gain.
[0021] It can be understood that the exposure amount is equal to the product of the exposure time and the gain, therefore, after the exposure amount corresponding to the current shooting light condition and the exposure time are determined, the gain corresponding to the exposure time can be determined, and the shooting is performed based on the exposure time and the gain, and the shooting preview picture obtained by the shooting is displayed at the target frame rate, so as to ensure that the exposure amount corresponding to the target frame rate and the exposure amount corresponding to the first frame rate are the same, and the display quality of the shooting preview picture is ensured.
[0022] In a second aspect, the present application provides an electronic device, comprising: one or more processors; one or more memories; the one or more memories store one or more programs, when the one or more programs are executed by the one or more processors, the electronic device performs the shooting method in the first aspect and any possible implementation of the first aspect.
[0023] In a third aspect, the present application provides a computer readable storage medium, the readable storage medium stores instructions, when the instructions are executed on a computer, the computer executes the shooting method in the first aspect and any possible implementation of the first aspect.
[0024] In a fourth aspect, the present application provides a computer program product, comprising: computer instructions, when the computer instructions are executed on an electronic device, the electronic device executes the shooting method in the first aspect and any possible implementation of the first aspect.
[0025] The beneficial effects of the second aspect to the fourth aspect can refer to the beneficial effects of the first aspect and any possible implementation of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0026] FIG. 1 shows an interface diagram of a shooting preview picture of an electronic device according to some embodiments of the present application;
[0027] FIG. 2A shows a flow diagram of an initial shooting method in a dark light scene according to some embodiments of the present application;
[0028] FIG. 2B shows a diagram of an exposure table according to some embodiments of the present application;
[0029] FIG. 3A shows a flow diagram of a shooting method according to some embodiments of the present application;
[0030] FIG. 3B shows a display interface diagram of a zoom bar in an expanded state according to some embodiments of the present application;
[0031] FIG. 4 shows another display interface diagram of a zoom bar in an expanded state according to some embodiments of the present application;
[0032] FIG. 5 shows a schematic diagram of zooming a captured image by double-finger according to some embodiments of the present application;
[0033] FIG. 6 shows a flowchart of a shooting method for increasing a display frame rate of a captured image by increasing a first lower limit value according to some embodiments of the present application;
[0034] FIG. 7 shows a flowchart of another shooting method for increasing a display frame rate of a captured image according to some embodiments of the present application;
[0035] FIG. 8 shows a schematic diagram of a frame rate changing over time when an electronic device is in a dark-light zoom state according to some embodiments of the present application;
[0036] FIG. 9 shows another schematic diagram of a frame rate changing over time when an electronic device is in a dark-light zoom state according to some embodiments of the present application;
[0037] FIG. 10 shows a flowchart of another shooting method for increasing a display frame rate of a captured image according to some embodiments of the present application;
[0038] FIG. 11 shows a comparison between an initial shooting method and the shooting method according to some embodiments of the present application;
[0039] FIG. 12 shows a hardware structure of a mobile phone 10 according to some embodiments of the present application;
[0040] FIG. 13 shows a software structure of a mobile phone 10 according to some embodiments of the present application. DETAILED DESCRIPTION
[0041] The illustrative embodiments of the present application include, but are not limited to, a shooting method, an electronic device, a readable storage medium and a program product.
[0042] The following explains the specific terms used in the embodiments of the present application.
[0043] (1) Exposure amount is used to measure how much light enters the camera of an electronic device.
[0044] (2) Exposure time refers to the time for which a shutter is opened to project light onto the light-sensitive surface of a light-sensitive material. The longer the exposure time, the more light is projected onto the light-sensitive material of the camera, i.e. the greater the exposure amount of the camera. Therefore, if the ambient light is weak, the camera of the electronic device can increase the exposure time; if the ambient light is strong, the camera can shorten the exposure time.
[0045] (3) Frame rate is used to represent the rate of change of the number of frames over time, specifically refers to the number of frames per second (frames per second, FPS) output by the electronic device, and the unit is FPS. For example, if the frame rate is 60 FPS, it means that 60 frames of shooting images are output per second.
[0046] (4) Gain refers to the measure of the responsiveness of the camera of the electronic device to light in this application. By adjusting the gain, the sensitivity of the camera to light can be changed, thereby affecting the imaging brightness of the shooting image.
[0047] (5) The noise of the image refers to the extraneous pixels that should not appear in the shooting image. Noise will make the shooting image look rough and distorted, thereby affecting the quality of the shooting image.
[0048] (6) The light intensity is the luminous flux of visible light received by the camera of the electronic device per unit area, and the unit is lux. When light shines on the camera of the electronic device, the illuminance sensor in the electronic device can detect the size of the light intensity of the current environment.
[0049] The related background involved in the embodiments of the present application will be briefly described below.
[0050] It can be understood that the shooting method provided by the present application can be applied to electronic devices with shooting function and display shooting image function. The electronic device includes but is not limited to mobile phone, smart TV, wearable device, tablet computer (Pad), computer with wireless transceiver function, virtual reality (virtual reality, VR) device, augmented reality (augmented reality, AR) device, wireless device in self driving, wireless device in remote medical surgery, wireless device in smart home, etc.
[0051] FIG. 1 shows an interface schematic diagram of a shooting preview picture of an electronic device. In FIG. 1, the shooting preview picture 100 includes a preview area 101, a zoom bar 102, and a shooting image 103, etc. Among them, the shooting image 103 is displayed in the preview area 101 for user preview. The zoom bar 102 in FIG. 1 is in a non-expanded state and includes four zooming rates, which are 0.5x, 1x, 2.5x, and 5x, respectively, and the shooting image 103 in FIG. 1 corresponds to a zooming rate of 1x.
[0052] It can be understood that after the camera application is started, an auto exposure (AE) module inside the electronic device determines an exposure time and a gain required for the current shooting operation according to a shooting light condition (for example, light intensity, etc.) in an environment in which the electronic device is currently located. Then, the electronic device responds to the shooting operation based on the determined exposure time and gain, and obtains a shooting image 103 as shown in FIG. 1.
[0053] Compared with a bright light scene, the camera of the electronic device in a dark light scene receives less light in a unit exposure time. If the same exposure time as the bright light scene is still used at this time, the imaging brightness of the obtained shooting image will be low. Therefore, in the dark light scene, the electronic device can increase the exposure time to improve the imaging brightness of the obtained shooting image in the dark light scene. In addition, since the exposure time and the frame rate are inversely proportional to each other, the increase of the exposure time in the dark light scene will cause the frame rate of the shooting image to be reduced when the shooting image is displayed in preview.
[0054] It can be understood that the electronic device is provided with a preset frame rate range [Fmin, Fmax], where Fmax is a first upper limit value of the preset frame rate range, and Fmin is a first lower limit value of the preset frame rate range. After the electronic device obtains the corresponding frame rate F (as an example of the first frame rate) based on the exposure time, the frame rate F is compared with the preset frame rate range [Fmin, Fmax]. If Fmin≤F≤Fmax, the shooting image is processed and displayed based on the frame rate F, the exposure time and the gain. If F<Fmin, the exposure time and the gain are recalculated based on the first lower limit value Fmin, and then the shooting image is processed and displayed based on the first lower limit value Fmin and the exposure time and the gain corresponding to the first lower limit value Fmin.
[0055] As described above, when the user performs the zoom operation on the shooting image in the dark light scene, the shooting preview screen needs to display shooting images of multiple zoom ratios in a unit time, so the frame rate required for the preview display of the shooting image is high. If the shooting is performed based on the first lower limit value Fmin at this time because the frame rate F is less than the first lower limit value Fmin, the first lower limit value Fmin cannot meet the high frame rate requirement in the zoom operation, which causes the shooting image to be stuck when switching, and reduces the display fluency of the shooting image.
[0056] Therefore, in order to solve the above technical problems, the present application provides a photographing method. In the method, if the electronic device detects that a user performs a zoom operation on a photographed image in a dark light scene, the photographed image in a photographing preview picture can be displayed at a target frame rate F1, wherein the target frame rate F1 is greater than a first frame rate F corresponding to a current exposure time. For example, the electronic device can increase a first lower limit value Fmin to a second lower limit value Fmin', so that in the case where the first frame rate F is less than Fmin', the second lower limit value Fmin' is taken as the target frame rate F1, and the photographed image is displayed at the target frame rate F1. For another example, after the electronic device obtains the first frame rate F based on the exposure time, it is determined whether the first frame rate F is less than the first lower limit value Fmin. If the first frame rate F is less than the first lower limit value Fmin, the photographed image is displayed based on a target frame rate F1 greater than the first lower limit value Fmin.
[0057] In the above case, the value range of the target frame rate F1 may, for example, be Favg-(Favg-Fmin) / 3≤F1≤Favg+(Fmax-Favg) / 3. Wherein Favg is the average of Fmax and Fmin. For example, if Fmax is 40 and Fmin is 10, the range of F1 can be [20, 30]. It can be understood that if the frame rate used during photographing is smaller, the display fluency of the photographed image in the photographing preview picture is lower; if the frame rate used is larger, the noise of the photographed image is higher, which affects the display quality of the photographed image. Therefore, when the photographing preview picture is displayed at the target frame rate F1 in the above range, both the display fluency and the quality of the displayed photographed image can be ensured.
[0058] In addition, in some other embodiments, after the electronic device obtains the first frame rate F based on the exposure time, if it is determined that the first frame rate F is greater than or equal to the first lower limit value Fmin, it can further determine whether the first frame rate F is less than the average value Favg. If the first frame rate F is less than the average value Favg, the average value Favg is taken as the target frame rate F1, and the photographed image is displayed at the target frame rate F1.
[0059] It can be understood that even if the first frame rate F is greater than the first lower limit value Fmin, it is possible that the frame rate required for the zoom operation in the dark light scene cannot be met, so that the photographed image is stuck. When the frame rate is the average value Favg of Fmax and Fmin, the display fluency and the display quality of the photographed image can usually be ensured. Therefore, when the first frame rate F is less than Favg, the photographed image is displayed based on Favg, which can improve both the display fluency and the display quality.
[0060] Before the shooting method provided by the embodiments of the present application is described in detail, the specific process of displaying a shooting image by an electronic device in a dark light scene is described first. Referring to FIG. 2A, FIG. 2A shows a flowchart of an initial shooting method of an electronic device in a dark light scene. The method can be performed by the electronic device, and can include the following steps:
[0061] 201: display a shooting preview picture.
[0062] It can be understood that in the present application, the user can start the camera application by clicking the icon corresponding to the shooting application (for example, the camera application) in the display screen of the electronic device. After the camera application is started, the shooting preview picture and the shooting image can be displayed in the display screen of the electronic device. The interface diagram of the shooting preview picture can be as shown in the interface 100 in FIG. 1, and the shooting image can be as shown in the shooting image 103 in FIG. 1.
[0063] 202: determine whether the current is in a dark light scene.
[0064] If the determination result is yes, that is, the electronic device is currently in a dark light scene, step 203 is performed;
[0065] If the determination result is no, that is, the electronic device is not currently in a dark light scene, step 202 can be performed again at a fixed time interval until the electronic device determines that the current is in a dark light scene, and step 203 is performed.
[0066] In the embodiments of the present application, after the camera application displays the shooting preview picture, the electronic device detects whether the electronic device is in a dark light scene in real time. The determination method of the dark light scene will be described in detail later, which is not described here.
[0067] 203: determine the required exposure time, gain and frame rate based on the shooting illumination condition in the current dark light scene.
[0068] It can be understood that the environment in which the electronic device is located is different, and the required exposure amount of the electronic device in response to the shooting operation of the user is different, thereby making the imaging brightness of the shooting image different. Therefore, in some embodiments, the electronic device can determine the required exposure amount based on the shooting illumination condition (such as the illumination intensity) in the current dark light scene, and then determine the corresponding exposure time, gain and frame rate based on the exposure amount.
[0069] The details of this step will be described later, which are not described here.
[0070] 204: determine whether the frame rate belongs to a preset frame rate range.
[0071] If the result of the judgment is yes, i.e., the frame rate belongs to the preset frame rate range, step 205 is performed, and the captured image is displayed based on the calculated frame rate, exposure time and gain;
[0072] If the result of the judgment is no, i.e., the frame rate does not belong to the preset frame rate range, step 206 is performed, and it is further determined whether the frame rate is less than the first lower limit value of the preset frame rate range.
[0073] 205: The captured image is displayed based on the calculated frame rate, exposure time and gain.
[0074] In this application, displaying the captured image based on the frame rate, exposure time and gain can be that the electronic device displays the captured image at the determined frame rate in response to the user's shooting operation based on the exposure time and gain.
[0075] 206: It is determined whether the frame rate is less than the first lower limit value of the preset frame rate range.
[0076] If the result of the judgment is yes, i.e., the frame rate is less than the first lower limit value of the preset frame rate range, step 207 is performed, and the captured image is displayed based on the first lower limit value and the exposure time and gain corresponding to the first lower limit value;
[0077] If the result of the judgment is no, i.e., the frame rate is not less than the first lower limit value of the preset frame rate range, for example, the frame rate is greater than or equal to the first upper limit value of the preset frame rate range, it indicates that the frame rate calculation is incorrect, and step 203 can be performed again to recalculate the exposure time, gain and frame rate.
[0078] 207: The captured image is displayed based on the first lower limit value and the exposure time and gain corresponding to the first lower limit value.
[0079] The calculation method of the exposure time and gain corresponding to the first lower limit value will be described in detail below.
[0080] In some embodiments, the manner in which the electronic device determines the exposure time, gain and frame rate based on the shooting light conditions can include steps 2031-2033.
[0081] 2031: The exposure amount required for the current shooting is determined according to the shooting light conditions of the current environment.
[0082] In the embodiments of the present application, the electronic device can determine the exposure amount required for shooting according to the light intensity in the current environment to prevent the quality of the captured image from being weak due to overexposure or underexposure. For example, the electronic device can input the current light intensity into an exposure amount determination model that has been pre-trained, and then obtain the output exposure amount based on the model. It can be understood that if the environment in which the electronic device is located is different, the exposure amount required for shooting is also different.
[0083] 2032: Determine the exposure time and the gain based on the required exposure amount and the exposure table.
[0084] In some embodiments, the exposure amount is the product of the exposure time and the gain.
[0085] In some embodiments, the exposure table comprises a corresponding relationship among the exposure amount, the exposure time and the gain. FIG. 2B shows a schematic diagram of an exposure table. As shown in FIG. 2B, the horizontal axis represents the gain, the vertical axis represents the exposure time, and the four line segments in FIG. 2B correspond to different exposure amounts respectively. It can be understood that the corresponding relationship among the exposure time, the gain and the exposure amount shown in FIG. 2B is a corresponding relationship pre-set according to actual application scenarios. That is, the exposure time, the gain and the exposure amount can also have a corresponding relationship different from that shown in FIG. 2B, which is not limited in the embodiments of the present application.
[0086] As shown in FIG. 2B, when the required exposure amount is between 0-10, the specific exposure time and gain are determined by the relationship between the exposure time and the gain corresponding to the line segment 1. For example, if the required exposure amount is 8, based on the line segment 1, the gain is 1 at this time. Since the exposure amount is equal to the product of the gain and the exposure time, the exposure time can be calculated to be 8ms.
[0087] Similarly, when the required exposure amount is between 10-40, the exposure time and the gain are determined by the line segment 2. For example, if the required exposure amount is 20, based on the line segment 2, the exposure time is 10ms at this time. Since the exposure amount is equal to the product of the gain and the exposure time, the gain can be calculated to be 2.
[0088] When the required exposure amount is between 40-80, the exposure time and the gain are determined by the line segment 3. When the required exposure amount is between 80-200, the exposure time and the gain are determined by the line segment 4, and so on. Since the specific determination methods of the exposure time and the gain represented by the line segment 3 and the line segment 4 are similar to those represented by the line segment 1 and the line segment 2 described above, they will not be exemplified and described here.
[0089] 2033: Determine the frame rate based on the exposure time.
[0090] It can be understood that the exposure time and the frame rate are inversely proportional to each other. Therefore, after the exposure time is determined, the frame rate can also be determined.
[0091] It can be understood that the above-mentioned shooting method in the dark light scene shown in FIG. 2A can be called an initial shooting method.
[0092] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings. FIG. 3A shows a flowchart of a photographing method provided by the present application. The method can be applied to an electronic device. As shown in FIG. 3A, the method can include the following steps.
[0093] 301: Display a photographing preview picture.
[0094] It can be understood that the specific execution process of this step is similar to that of the previous step 201, and thus will not be repeated here.
[0095] 302: Determine whether a zoom operation is performed on the photographing preview picture.
[0096] If the determination result is yes, that is, the electronic device determines that the zoom operation is performed on the photographing preview picture, step 303 is performed.
[0097] If the determination result is no, that is, the electronic device determines that the zoom operation is not performed, step 302 can be performed again after a fixed time interval, until the electronic device determines that the zoom operation is performed, and step 303 is performed.
[0098] It can be understood that the electronic device determines that the current is in a dark light scene, and further determines whether the zoom operation is performed on the photographing preview picture. Referring to FIG. 1, the zoom operation on the photographing preview picture can be a zoom operation on the photographing image 103 displayed in the photographing preview picture 100 in FIG. 1.
[0099] It can be understood that after the electronic device determines that the current is in a dark light scene, it further determines whether the zoom operation is performed on the photographing preview picture. Referring to FIG. 1, the zoom operation on the photographing preview picture can be a zoom operation on the photographing image 103 displayed in the photographing preview picture 100 in FIG. 1.
[0100] The present application does not limit the manner of the zoom operation of the user. For example, the user can perform the zoom operation on the photographing image by sliding the zoom bar, which can be referred to as single-finger zoom. FIG. 3B shows an interface diagram of a zoom bar in an expanded state. Compared with the zoom bar 102 in the non-expanded state in FIG. 1, the zoom bar 102 (as an example of a zoom control) in FIG. 3B is in the expanded state, and the current zoom ratio displayed in FIG. 3B is 1x.
[0101] The present application does not limit the manner in which the zoom bar 102 changes from the non-expanded state to the expanded state. For example, the user can long press the zoom bar 102 in the non-expanded state in FIG. 1, and the zoom bar 102 changes to the expanded state shown in FIG. 3B. Alternatively, the user can directly slide the zoom bar 102 in the non-expanded state in FIG. 1, and in this case, the zoom bar 102 also changes to the expanded state shown in FIG. 3B.
[0102] After the zoom bar 102 is in the expanded state, the user can slide the zoom bar 102 left or right to change the zoom ratio. Based on FIG. 3B, as shown in FIG. 4, the user can slide the zoom bar 102 to the right to change the zoom ratio from 1x to 0.5x.
[0103] For another example, as shown in FIG. 5, the user can also zoom the captured image by double-finger tapping. This zoom operation can be referred to as double-finger zooming.
[0104] For another example, the user can also perform zooming on the captured image 103 by performing a long-press operation on the key 104 (as an example of a first key) in FIG. 5.
[0105] It can be understood that, regardless of which of the above ways the user performs zooming, the electronic device can determine whether the user performs zooming based on the change in the zoom ratio.
[0106] Embodiments of the present application do not limit the manner in which the electronic device determines zooming based on the zoom ratio. For example, the electronic device detects that the zoom ratio of the captured image is a1 at t1, detects that the zoom ratio of the captured image is a2 at t2, and does not detect a stop of zooming between t1 and t2, and can determine that the user performs zooming between t1 and t2. The stop of zooming includes, but is not limited to, the user's finger leaving the display screen, the user releasing the key or control used to adjust the zoom ratio, or the number of the user's fingers touching the display screen changing.
[0107] In some embodiments, the number of the user's fingers touching the display screen changing can be, for example, in the case of double-finger zooming, one of the fingers no longer touching the display screen, at which time the number of fingers changes, and the electronic device can determine that zooming is ended. For another example, in the case of single-finger zooming, the zoom bar is changed from being slid by a single finger to being touched by two fingers, at which time the number of fingers changes, and the electronic device can also determine that zooming is ended.
[0108] 303: Determine whether the current captured lighting condition meets the adjustment condition.
[0109] If the determination result is yes, i.e., the current captured lighting condition meets the adjustment condition, step 304 is performed;
[0110] If the determination result is no, i.e., the current captured lighting condition does not meet the adjustment condition, step 305 is performed, and the initial capturing method shown in FIG. 2A is performed.
[0111] It can be understood that determining whether the current shooting light condition meets the adjustment condition is to determine whether the current is in a dark light scene. The parameter reflecting the current shooting light condition is not limited in the embodiments of the present application, for example, the light intensity. Taking the light intensity as an example, the adjustment condition can be that the light intensity is less than a preset threshold (for example, a preset light intensity threshold). That is, when the light intensity is less than the preset threshold, it is determined that the current is in a dark light scene.
[0112] It can be understood that if the parameter reflecting the current shooting light condition is another parameter, the adjustment condition can also be that the value corresponding to the parameter is greater than the preset threshold. That is, when the value corresponding to the parameter is greater than the preset threshold, it is determined that the current is in a dark light scene, etc.
[0113] It can be understood that the execution order of steps 302 and 303 is not limited in the present application. For example, the electronic device can first determine whether the current shooting light condition meets the adjustment condition, and then determine whether the user performs the zoom operation on the shooting preview picture when the condition is met.
[0114] 304: Display the zoomed shooting preview picture at a target frame rate, the target frame rate being greater than the first frame rate.
[0115] Wherein, the first frame rate F is an initial exposure time determined by the electronic device based on the current shooting light condition (such as light intensity), and an initial frame rate determined based on the initial exposure time. The determination method of the first frame rate F can refer to the content of steps 2031-2033 in the foregoing. The preset frame rate range is a frame rate range pre-set in the electronic device, for example, it can be the preset frame rate range [Fmin, Fmax] described in the foregoing, and at this time the first lower limit value of the preset frame rate range is Fmin.
[0116] In the first embodiment, after determining the first frame rate F, the electronic device can increase the first lower limit value Fmin to a second lower limit value Fmin'. In this way, when the first frame rate F is less than the second lower limit value Fmin', the second lower limit value Fmin' can be taken as the target frame rate F1 and the shooting preview picture is displayed at the target frame rate F1. If the first frame rate F is greater than or equal to the second lower limit value Fmin', the shooting preview picture is displayed based on the first frame rate F.
[0117] In the second embodiment, after determining the first frame rate F, if it is determined that the first frame rate F is less than the first lower limit value Fmin, the shooting preview picture is displayed at a target frame rate F1 greater than the first lower limit value Fmin. Wherein, the target frame rate F1 can belong to the preset frame rate range [Fmin, Fmax].
[0118] Further, if the first frame rate F is greater than or equal to the first lower limit value Fmin, the shooting preview picture can also be displayed at a target frame rate F1 greater than the first frame rate F. The specific content will be described in detail later, which is not described here.
[0119] 305: execute the initial shooting method.
[0120] It can be understood that the specific content of the initial shooting method of this step can be referred to the foregoing FIG. 2A and the related description.
[0121] Compared with the way of displaying the shooting preview picture at the first lower limit value Fmin when the first frame rate F is less than the first lower limit value Fmin, the method can display the shooting preview picture based on a target frame rate F1 greater than both the first frame rate F and the first lower limit value Fmin, thereby increasing the shooting preview picture display frame rate and further increasing the shooting image display fluency.
[0122] Next, the first embodiment described above, i.e., the way of increasing the display frame rate by increasing the first lower limit value Fmin, will be described in detail. FIG. 6 shows a flowchart of a shooting method for increasing the display frame rate of a shooting image by increasing the first lower limit value according to an embodiment of the present application. As shown in FIG. 6, the flowchart includes but is not limited to the following steps:
[0123] 601: display a shooting preview picture.
[0124] 602: determine whether a zoom operation is performed on the shooting preview picture.
[0125] If the determination result is yes, i.e., the electronic device determines that the user performs a zoom operation on the shooting preview picture, step 603 is executed;
[0126] If the determination result is no, i.e., the electronic device determines that the user does not perform a zoom operation, the electronic device can execute step 602 again at a fixed time interval until the electronic device determines that the user performs a zoom operation and executes step 603.
[0127] 603: determine whether the current is in a dark light scene.
[0128] If the determination result is yes, i.e., the electronic device determines that the current is in a dark light scene, step 605 is executed;
[0129] If the determination result is no, i.e., the electronic device determines that the current is not in a dark light scene, step 604 is executed to execute the initial shooting method shown in FIG. 2A.
[0130] It can be understood that the specific execution process of the above steps 601-603 is similar to that of the corresponding steps in the foregoing steps 301-303, which will not be described here.
[0131] 604: Perform an initial shooting method.
[0132] 605: Increase the first lower limit value to a second lower limit value.
[0133] In the embodiment of the present application, after the electronic device determines that the user performs the zoom operation in the dark light scene, the first lower limit value Fmin of the preset frame rate range [Fmin, Fmax] can be increased to a second lower limit value Fmin'. The second lower limit value Fmin' belongs to the preset frame rate range [Fmin, Fmax].
[0134] In the embodiment of the present application, the value range of the second lower limit value Fmin' can be Favg-(Favg-Fmin) / 3≤Fmin'≤Favg+(Fmax-Favg) / 3. Wherein, Favg is the average value of Fmax and Fmin. For example, if Fmax is 40 and Fmin is 10, the range of Fmin' can be [20, 30]. It can be understood that if the frame rate used for shooting is smaller, the display fluency of the shooting image in the shooting preview picture is lower; if the frame rate used is larger, the noise of the shooting image is higher, which affects the display quality of the shooting image. Therefore, when the second lower limit value Fmin' in the above range is used to display the shooting preview picture, both the display fluency and the quality of the displayed shooting image can be ensured.
[0135] It can be understood that the value range of the second lower limit value Fmin' described above is only an example and does not constitute a limitation on all embodiments of the present application. The value range can be set based on experience, or can be flexibly adjusted based on actual application scenarios.
[0136] 606: Calculate the first exposure time, the first gain and the first frame rate required in the current dark light scene according to the exposure table.
[0137] The first exposure time and the first gain are the initial exposure time and the initial gain currently required by the electronic device based on the shooting illumination condition (such as illumination intensity) in the current dark light scene. The first frame rate F is the initial frame rate determined by the electronic device based on the current shooting illumination condition (such as illumination intensity) to determine the initial exposure time (i.e. the first exposure time), and then based on the first exposure time.
[0138] The specific execution process of this step is similar to that of the corresponding steps in the previous steps 2031-2033, and will not be repeated here.
[0139] 607: Determine whether the first frame rate is less than the second lower limit value.
[0140] If the determination result is yes, i.e., the first frame rate F is less than the second lower limit value Fmin', step 608 is performed, the second lower limit value is taken as the target frame rate F1, and the target exposure time and the target gain corresponding to the target frame rate F1 are recalculated;
[0141] If the determination result is no, i.e., the first frame rate F is not less than the second lower limit value Fmin', step 610 is performed, and the captured image is displayed based on the first exposure time, the first gain, and the first frame rate F.
[0142] It can be understood that when the first frame rate F is less than the second lower limit value Fmin', the electronic device can determine to take the second lower limit value as the target frame rate F1 and display the captured image at the target frame rate F1. However, since the frame rate is related to the exposure time, if the captured image is displayed based on the target frame rate F1 instead of the first frame rate F, the exposure time also needs to be determined again. In the case where the exposure amount is unchanged, the exposure time is determined again, and the gain also needs to be determined again. Therefore, the target exposure time and the target gain corresponding to the target frame rate F1 need to be determined again.
[0143] 608: Take the second lower limit value as the target frame rate, and calculate the target exposure time and the target gain corresponding to the target frame rate.
[0144] Exemplarily, after the electronic device takes the second lower limit value as the target frame rate, the target exposure time corresponding to the target frame rate F1 can be further determined. It can be understood that the target exposure time is the reciprocal of the target frame rate F1.
[0145] Further, since the exposure amount is the product of the exposure time and the gain, after the target exposure time is determined, the electronic device can further determine the target gain based on the exposure amount and the target exposure time.
[0146] It can be understood that in this way, the captured image is displayed based on the target frame rate F1 which is greater than the first lower limit value Fmin, which can increase the display fluency of the captured image. In addition, by adjusting the gain, the exposure amount before and after the frame rate adjustment is ensured to be unchanged, and thus the imaging brightness of the captured image is maintained. In summary, this way not only improves the fluency of the captured image, but also ensures the imaging brightness of the captured image, thereby improving the display quality of the captured image.
[0147] 609: Display the captured image based on the target exposure time, the target gain, and the target frame rate.
[0148] It can be understood that the electronic device displays the captured image at the target frame rate F1 in response to the user's shooting operation based on the obtained target exposure time and target gain.
[0149] 610: Display the captured image based on the first exposure time, the first gain, and the first frame rate.
[0150] It can be understood that the electronic device displays the shooting image at the first frame rate F based on the obtained first exposure time and the first gain in response to the shooting operation of the user.
[0151] FIG. 7 shows a flowchart of another shooting method for increasing the display frame rate of the shooting image by increasing the first lower limit value of the preset frame rate range. As shown in FIG. 7, the flowchart includes but is not limited to the following steps:
[0152] 701: display a shooting preview picture.
[0153] 702: determine whether the user performs a zoom operation.
[0154] If the determination result is yes, that is, the electronic device determines that the user performs a zoom operation on the shooting preview picture, step 703 is performed to determine whether the user performs a zoom operation on the shooting preview picture.
[0155] If the determination result is no, that is, the electronic device determines that the user does not perform a zoom operation, the electronic device can execute step 702 again at a fixed time interval until the electronic device determines that the user performs a zoom operation, and then execute step 703.
[0156] 703: determine whether the current is in a dark light scene.
[0157] If the determination result is yes, that is, the electronic device determines that the current is in a dark light scene, step 704 is performed.
[0158] If the determination result is no, that is, the electronic device determines that the current is not in a dark light scene, step 705 is performed.
[0159] It can be understood that the specific execution process of steps 701-703 described above is similar to the specific execution process of the corresponding steps in steps 301-303 described above, and will not be repeated here.
[0160] 704: increase the first lower limit value Fmin and increase the gain so that the imaging brightness of the shooting image is unchanged.
[0161] It can be understood that if the electronic device determines that the user performs a zoom operation, the first lower limit value Fmin of the preset frame rate range can be increased to a second lower limit value Fmin'. In this way, after the electronic device determines the first frame rate F required based on the current shooting light condition, if it is determined that the first frame rate F is less than the second lower limit value Fmin', the second lower limit value Fmin' can be used as the target frame rate F1, and the shooting image can be displayed at the target frame rate F1.
[0162] The target frame rate F1 is greater than the first lower limit value Fmin, and the frame rate and the exposure time are reciprocal to each other, so the exposure time corresponding to the target frame rate F1 is shorter than the exposure time corresponding to the first lower limit value Fmin. In the case of the same exposure amount, the target gain corresponding to the target frame rate F1 is greater than the gain corresponding to the first lower limit value Fmin. Therefore, when displaying the captured image at the target frame rate F1, the gain corresponding to the captured image is increased. In addition, since the exposure amount is the same, the electronic device increases the first lower limit value and correspondingly increases the gain, so that the imaging brightness of the captured image remains unchanged.
[0163] The specific execution process of this step is similar to that of the corresponding step in steps 605-609 described above, and will not be repeated here.
[0164] 705: Keep the first lower limit value Fmin and the gain unchanged, so that the imaging brightness of the captured image remains unchanged.
[0165] It can be understood that the specific execution process of this step is similar to that of the corresponding step in steps 203-207 described above, and will not be repeated here.
[0166] 706: Display the captured image.
[0167] It can be understood that after the electronic device obtains the captured image based on the above step 704 or step 705, the electronic device can display the obtained captured image in the shooting preview picture 100 as shown in FIG. 1, that is, display the captured image.
[0168] FIG. 8 shows a schematic diagram of the change of the frame rate with time when the electronic device is in the dark light zoom state.
[0169] The corresponding preset frame rate range of FIG. 8 is [10, 30], that is, the first lower limit value of the preset frame rate range is 10 and the first upper limit value is 30. As shown in FIG. 8, the horizontal axis represents time, and the left vertical axis represents the display frame rate of the captured image corresponding to the electronic device at different times when the preset frame rate range is [10, 30]. The change curve of the display frame rate of the captured image with time can be shown as curve m1 in FIG. 8. For example, referring to FIG. 8, the electronic device enters a dark light scene from a bright light scene during the first 1 second to the sixth second, and based on the foregoing, the display frame rate of the captured image of the electronic device gradually decreases during this process. At the sixth second, the electronic device has entered the dark light scene, and the current required frame rate (an example of the first frame rate) obtained by the electronic device based on the shooting illumination condition of the current dark light scene is less than the first lower limit value 10 of the preset frame rate range, so the captured image is displayed based on the first lower limit value 10. Therefore, the display frame rate of the captured image corresponding to the sixth second in FIG. 8 is 10.
[0170] FIG. 9 shows a schematic diagram of the frame rate of the electronic device in the dark-light zoom state changing over time.
[0171] In FIG. 9, the display frame rate of the photographed image changes over time as shown by curve m2. For example, referring to FIG. 9, the corresponding preset frame rate range during the first second to the eighth second is [10, 30], and based on the same principle as in FIG. 8, at the sixth second, the display frame rate of the photographed image is the first lower limit value 10 of the preset frame rate range. If the electronic device detects that the user performs a zoom operation at the eighth second, the first lower limit value of the preset frame rate range is adjusted from 10 to the second lower limit value 15. Taking the eleventh second as an example, at this time, the current required frame rate (an example of the first frame rate) obtained by the electronic device based on the photographed light condition in the current scene is less than the second lower limit value 15 of the modified preset frame rate range, and at this time, the photographed image is displayed based on the modified second lower limit value 15 (i.e., the target frame rate), so the display frame rate of the photographed image corresponding to the eleventh second in FIG. 9 is 15.
[0172] Based on FIG. 8 and FIG. 9, by increasing the first lower limit value of the preset frame rate range, when the current required first frame rate is less than the increased second lower limit value, the second lower limit value can be used as the target frame rate, and the photographed image can be displayed at the target frame rate, which can improve the display fluency of the photographed image.
[0173] The second embodiment, i.e., the way of displaying the photographed image at a target frame rate greater than the first lower limit value of the preset frame rate range when the first frame rate is less than the first lower limit value, will be described in detail below. FIG. 10 shows a schematic diagram of the interactive process of another shooting method for improving the display frame rate of the photographed image according to an embodiment of the present application. As shown in FIG. 10, the process is realized based on the interaction of the camera application, the judgment module, and the automatic exposure module of the electronic device, and the process includes but is not limited to the following steps:
[0174] 1001: The camera application displays a shooting preview picture.
[0175] 1002: The camera application sends the display state of the shooting preview picture to the judgment module.
[0176] 1003: The judgment module judges whether the user performs a zoom operation on the shooting preview picture.
[0177] It can be understood that after the judgment module receives the display state of the shooting preview picture sent by the camera application, i.e., after determining that the camera application displays the shooting preview picture, the step 1003 can be performed, i.e., further judging whether the user performs a zoom operation.
[0178] If the judgment result is yes, i.e., the electronic device determines that the user performs a zoom operation on the shooting preview picture, step 1004 is performed to judge whether the current is in a dark-light scene.
[0179] If the result is no, i.e. the electronic device determines that the user does not perform the zoom operation, the electronic device can execute step 1003 again after a fixed time interval until the electronic device determines that the user performs the zoom operation, and then execute step 1004 again.
[0180] 1004: The judgment module determines whether the current is in a dark light scene.
[0181] If the result is yes, i.e. the electronic device determines that the current is in a dark light scene, step 1006 is executed;
[0182] If the result is no, i.e. the electronic device determines that the current is not in a dark light scene, step 1005 is executed, and the initial shooting method shown in FIG. 2A is executed.
[0183] It can be understood that the specific execution process of steps 1001-1004 described above is similar to the specific execution process of the corresponding steps in steps 301-303 described above, and will not be repeated here.
[0184] 1005: The automatic exposure module executes the initial shooting method.
[0185] 1006: The automatic exposure module calculates the first exposure time, the first gain and the first frame rate required in the current dark light scene according to the exposure table.
[0186] The specific execution process of this step is similar to the specific execution process of step 606 described above, and will not be repeated here.
[0187] 1007: The automatic exposure module sends the first frame rate to the judgment module.
[0188] 1008: The judgment module determines whether the first frame rate is less than the first lower limit value of the preset frame rate range.
[0189] If the result is yes, i.e. the first frame rate F is less than the first lower limit value Fmin of the preset frame rate range, step 1009 is executed;
[0190] If the result is no, i.e. the first frame rate F is not less than the first lower limit value Fmin of the preset frame rate range, step 1010 is executed.
[0191] 1009: Respond to the shooting operation of the user based on the target exposure time and the target gain corresponding to the target frame rate greater than the first lower limit value, and display the shooting image at the target frame rate.
[0192] In the embodiments of the present application, the value range of the target frame rate F1 can be Favg-(Favg-Fmin) / 3≤F1≤Favg+(Fmax-Favg) / 3. It can be understood that the value range of the target frame rate F1 is only an example and does not constitute a limitation on all embodiments of the present application. The value range can be set based on experience or adjusted flexibly based on actual application scenarios.
[0193] It can be understood that the specific execution process of determining the target exposure time and the target gain based on the target frame rate F1 is similar to the specific execution process of step 608, which will not be repeated here.
[0194] In the above scheme, if the first frame rate F is less than the first lower limit value Fmin, the captured image is displayed based on the target frame rate F1 greater than Fmin. Compared with the operation of displaying the captured image based on Fmin when the first frame rate F is less than the first lower limit value Fmin in some embodiments, in this scheme, the target frame rate F1 for displaying the captured image is greater than Fmin, and the display fluency of the captured image during the zoom operation is higher.
[0195] 1010: The judgment module judges whether the first frame rate is less than the average of the first lower limit value and the first upper limit value.
[0196] If the judgment result is yes, that is, the first frame rate F is less than the average Favg of the first lower limit value and the first upper limit value, step 1011 is executed;
[0197] If the judgment result is no, that is, the first frame rate F is greater than or equal to the average Favg of the first lower limit value and the first upper limit value, step 1012 is executed.
[0198] 1011: The average is taken as the target frame rate, and the captured image is displayed at the target frame rate in response to the user's shooting operation based on the target exposure time and the target gain corresponding to the target frame rate.
[0199] The specific execution process of determining the target exposure time and the target gain corresponding to the target frame rate based on the target frame rate is similar to the specific execution process of step 608, which will not be repeated here.
[0200] It can be understood that even if the first frame rate F is greater than the first lower limit value Fmin, it is possible that the frame rate required for the zoom operation in the dark light scene cannot be met, causing the captured image to be stuck. When the frame rate is the average Favg of Fmax and Fmin, the display fluency and display quality of the captured image can usually be guaranteed. Therefore, when the first frame rate F is less than Favg, the average Favg can be taken as the target frame rate, and the captured image can be displayed based on the target frame rate to guarantee the display fluency and display quality of the captured image.
[0201] 1012: display the photographed image at the first frame rate in response to the first exposure time and the first gain corresponding to the first frame rate based on the user's photographing operation.
[0202] FIG. 11 shows a comparison between an initial photographing method and the photographing method provided in the present application. As shown in FIG. 11, in the initial photographing method, if the electronic device enters a dark-light scene from a bright-light scene at t3, based on the foregoing, the electronic device will reduce the frame rate to improve the imaging brightness of the photographed image. If the electronic device detects that the user performs a zoom operation on the photographed image in the dark-light scene at t4, the electronic device will still adopt the manner of reducing the frame rate to improve the imaging brightness.
[0203] In the photographing method provided in the present application, if the electronic device detects that the user performs a zoom operation on the photographed image in the dark-light scene, the frame rate will be increased. For example, after the first frame rate F is calculated, the first lower limit value Fmin of the preset frame rate range is increased to a second lower limit value Fmin'. In this way, the second lower limit value Fmin' can be used as the target frame rate F1 when the first frame rate F is less than the second lower limit value Fmin', and the photographed image can be displayed at the target frame rate F1. For another example, after the first frame rate F is calculated, if the first frame rate F is less than the first lower limit value Fmin of the preset frame rate range, the photographed image can be displayed at a target frame rate greater than the first lower limit value Fmin. In addition, after the frame rate is increased, the gain can be increased correspondingly to improve the imaging brightness of the photographed image, so as to ensure that the imaging brightness before and after zooming is the same.
[0204] Therefore, the method provided in the present application can not only increase the display fluency of the photographed image by increasing the frame rate, but also ensure that the imaging brightness of the photographed image before and after zooming is the same, thereby ensuring the display quality of the photographed image.
[0205] An electronic device is provided in an embodiment of the present application. The electronic device includes one or more processors, one or more memories, and one or more programs stored in the one or more memories and configured to, working with the one or more processors, cause the electronic device to perform the photographing method described in the foregoing embodiments. In addition, the related content of the electronic device to which the method provided in the present application is applicable has been described in detail in the foregoing, and will not be described herein again.
[0206] An electronic device is provided in an embodiment of the present application. The electronic device includes one or more processors, one or more memories, and one or more programs stored in the one or more memories and configured to, working with the one or more processors, cause the electronic device to perform the photographing method described in the foregoing embodiments. In addition, the related content of the electronic device to which the method provided in the present application is applicable has been described in detail in the foregoing, and will not be described herein again.
[0207] The embodiment of the present application further provides a computer program product, comprising: execution instructions stored in a readable storage medium, at least one processor of an electronic device can read the execution instructions from the readable storage medium, and the at least one processor executes the execution instructions to enable the electronic device to implement the photographing method involved in the above embodiment.
[0208] FIG. 12 shows a structural schematic diagram of an electronic device (for example, a mobile phone 10) provided by an embodiment of the present application. It can be understood that the electronic device can be any electronic device with at least two cameras, including but not limited to a mobile phone, a wearable device (such as a smart watch, a smart bracelet, etc.), a tablet computer, a desktop computer, a laptop computer, a notebook computer, a netbook, etc., and the present application is not limited thereto.
[0209] The mobile phone 10 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a loudspeaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0210] It can be understood that the structure shown in the embodiment of the present application does not constitute a specific limitation on the mobile phone 10. In other embodiments of the present application, the mobile phone 10 can include more or fewer components than shown, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0211] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices, or can be integrated in one or more processors.
[0212] The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching and executing instructions.
[0213] The processor 110 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that the processor 110 has just used or repeatedly uses. If the processor 110 needs to use the instructions or data again, it can directly call from the above-mentioned memory. Avoid repeated access and reduce the waiting time of the processor 110, thereby improving the efficiency of the system. The processor can be used to execute the photographing method mentioned in the present application.
[0214] The external memory interface 120 can be used to connect an external storage card, such as a Micro SD card, to realize the expansion of the storage capacity of the mobile phone 100. The external storage card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in the external storage card.
[0215] Internal memory 121 can be used to store computer executable program code, including instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of mobile phone 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of mobile phone 100 by running instructions stored in internal memory 121 and / or instructions stored in memory located in the processor.
[0216] The SIM card interface 195 is used to connect the SIM card.
[0217] Figure 13 shows a software structure block diagram of the mobile phone 10 according to an embodiment of this application.
[0218] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, [the following is omitted as the text is incomplete and likely refers to a specific implementation or feature]. The system is divided into five layers, from top to bottom: application layer, application framework layer, Android runtime (...). The runtime system libraries, the hardware abstraction layer (HAL), and the kernel layer.
[0219] The application layer may include a series of application packages. In this application, the application layer may include the application package for a camera application.
[0220] As shown in Figure 13, the application package may include applications such as camera, gallery, banking, and communication. Additionally, the application package may also include system applications such as the home screen (i.e., desktop), the negative one screen, the control center, and the notification center. The camera application discussed in this application resides in this application layer.
[0221] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0222] The application framework layer can include a camera service. When a camera application in the application layer detects a user operation on the camera application (e.g., a user zoom operation), the camera application can send relevant operation information of the camera application to the HAL layer through the camera service in the application framework layer.
[0223] The system library can include a plurality of functional modules. For example, a surface manager, a two-dimensional graphics engine (e.g., SGL), and the like.
[0224] The hardware abstraction layer (HAL) is an interface layer between operating system software and hardware components. The HAL provides an interface for interaction between upper layer software and lower layer hardware. The HAL abstracts the underlying hardware into software that includes corresponding hardware interfaces. By accessing the HAL, a user can set up the underlying hardware device. For example, the user can enable or disable a relevant hardware component in the HAL. In some embodiments, the core architecture of the HAL is composed of at least one of C++ or C.
[0225] The automatic exposure module involved in the embodiments of the present application is located in the HAL layer shown in FIG. 13. The automatic exposure module is used to determine an exposure time, a frame rate, and a gain corresponding to a current scene, and the like.
[0226] The kernel layer is a layer between hardware and software. In FIG. 13, the kernel layer includes a display driver, a camera driver, an audio driver, a sensor driver, and the like.
[0227] It can be understood that, as used herein, the term "module" can refer to, be part of, or include an Application Specific Integrated Circuit (ASIC), an electronic circuit, a processor (shared, dedicated, or group) and / or memory that execute one or more software or firmware programs, a combinational logic circuit, and / or other suitable hardware components that provide the described functionality.
[0228] It can be understood that, in the embodiments of the present application, the processor can be a microprocessor, a digital signal processor, a microcontroller, and / or any combination thereof. According to another aspect, the processor can be a single-core processor, a multi-core processor, and / or any combination thereof.
[0229] Embodiments of the present application can be implemented in hardware, software, firmware, or a combination thereof. Embodiments of the present application can be implemented as computer programs or program codes executing on programmable systems comprising at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.
[0230] The program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices, which are known in the art. For purposes of this application, a processing system includes any system that has a processor, such as a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
[0231] The program code can be implemented in a high level procedural or object oriented programming language to communicate with a processing system. The program code can be implemented in assembly or machine language, if desired. In fact, the mechanisms described in this application are not limited in scope to any particular programming language. In any case, the language can be a compiled or interpreted language.
[0232] In some cases, the disclosed embodiments can be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments can also be implemented as instructions carried by or stored on a transitory or non-transitory machine-readable (e.g., computer-readable) medium, which can be read and executed by one or more processors. For example, the instructions can be distributed over the network or by other computer readable media. Thus, a machine-readable medium can include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including without limitation, floppy diskettes, optical disks, optical fiber, ROMs, RAMs, EPROMs, EEPROMs, magnetic or optical cards, flash memory, or tangible or other machine-readable media. Accordingly, a machine-readable medium includes any medium that is capable of storing or transmitting electronic or other kind of instructions that can be executed by a machine (e.g., a computer).
[0233] In the drawings, some of the structural or methodological features can be shown in particular arrangements and / or orders. However, it should be understood that such particular arrangements and / or orders can not be required. Instead, these features can be arranged in a different manner and / or order than shown in the illustrative figures, in some embodiments. Additionally, inclusion of structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and these features can be excluded or combined with other features in some embodiments.
[0234] It should be noted that each unit / module mentioned in each device embodiment of the present application is a logical unit / module, and in the physical world, one logical unit / module can be a physical unit / module, or a part of a physical unit / module, or be realized in a combination of multiple physical unit / modules, and the physical realization of these logical units / modules is not the most important thing, and the combination of the functions implemented by these logical units / modules is the key to solving the technical problems proposed in the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce the units / modules that are not closely related to solving the technical problems proposed in the present application, which does not mean that the above-mentioned device embodiments do not have other units / modules.
[0235] It should be noted that in the examples and descriptions of the present application, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including one" does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0236] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it should be understood by those skilled in the art that various changes in form and details can be made therein without departing from the scope of the present application.
Claims
1. A photographing method characterized by comprising: The method is applied to an electronic device, and the method comprises: displaying a shooting preview image; detecting a zoom operation of a user; judging whether a current shooting light condition meets an adjustment condition; when the current shooting light condition meets the adjustment condition, displaying a zoomed shooting preview image at a target frame rate, the target frame rate being greater than a first frame rate, the first frame rate being a frame rate determined by the electronic device based on an exposure time under the current shooting light condition.
2. The method of claim 1, wherein, The adjustment condition comprises: the light intensity under the current shooting light condition is less than a preset light intensity threshold.
3. The method of claim 2, wherein, The displaying of the zoomed shooting preview image at the target frame rate comprises: adjusting a first lower limit value of a preset frame rate range of the electronic device to a second lower limit value, the second lower limit value being greater than the first lower limit value; when the first frame rate is detected to be less than the second lower limit value, taking the second lower limit value as the target frame rate, and displaying the zoomed shooting preview image at the target frame rate.
4. The method of claim 2, wherein, The displaying of the zoomed shooting preview image at the target frame rate comprises: when the first frame rate is detected to be less than a first lower limit value of a preset frame rate range of the electronic device, displaying the zoomed shooting preview image at the target frame rate which is greater than the first lower limit value.
5. The method of claim 4, wherein, The method further comprises: when the first frame rate is detected to be greater than or equal to the first lower limit value, and the first frame rate is less than an average value of a first lower limit value and a first upper limit value of the preset frame rate range, taking the average value as the target frame rate, and displaying the zoomed shooting preview image at the target frame rate.
6. The method according to any one of claims 1 to 5, characterized in that, The target frame rate is less than or equal to a first upper limit value of a preset frame rate range of the electronic device.
7. The method according to any one of claims 1 to 5, characterized in that, The shooting preview image displays a shooting image, and the detecting of the zoom operation of the user comprises: detecting a sliding operation of the user on a zoom control in the shooting preview image; or detecting a zoom operation of the user on the shooting image by double fingers; or detecting a long-press operation of the user on a first key of the electronic device.
8. The method of claim 7, wherein, The method further comprises: determining an exposure time corresponding to the target frame rate, the exposure time and the target frame rate being inverses of each other; determining a gain based on an exposure amount corresponding to the current shooting light condition and the exposure time; performing shooting based on the exposure time and the gain.
9. An electronic device, comprising: comprise: one or more processors; one or more memories, the one or more memories storing one or more programs, when the one or more programs are executed by the one or more processors, causing the electronic device to perform the shooting method in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The readable storage medium stores instructions, when the instructions are executed on a computer, causing the computer to perform the shooting method in any one of claims 1 to 8.
11. A computer program product, characterised in that, comprise: computer instructions, when the computer instructions are run on an electronic device, causing the electronic device to perform the shooting method in any one of claims 1 to 8.