Shooting method, electronic equipment, readable storage medium and program product
By increasing the target frame rate and adjusting the exposure in low-light scenes, the problem of frame rate reduction caused by scaling operations in low-light scenes was solved, improving display smoothness and image quality.
Patent Information
- Application Number
- CN202411039649.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2026-02-10
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.
In low-light scenes, the target frame rate is increased to display the shooting preview screen at a rate greater than the first frame rate. The target frame rate is greater than the lower limit of the preset frame rate range, and the exposure is adjusted according to the exposure time and gain to ensure image quality.
It improves the smoothness of scaling operations and image quality in low-light scenes, avoids stuttering caused by reduced frame rate, and ensures image brightness and noise control.
Smart Images

Figure CN121509826A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of photography technology, and in particular to a photography method, electronic device, readable storage medium, and program product. Background Technology
[0002] When electronic devices (such as mobile phones and tablets) take photos using camera applications (such as camera apps), they display a preview screen. Users can then adjust the zoom level in the preview screen to scale the captured image to meet their different preview needs.
[0003] If a user zooms in on a captured image in a dark environment (low-light scene), the electronic device will typically increase the exposure time by reducing the frame rate during camera preview. This results in a brighter image and improved display quality in the low-light scene.
[0004] However, during zooming, the preview screen needs to display multiple zoom levels of captured images per unit of time, resulting in a high frame rate required for previewing. Therefore, if the electronic device reduces the frame rate in low-light scenes, the reduced frame rate may not be able to meet the high frame rate requirements of zooming, causing stuttering when switching between captured images and reducing the smoothness of image display. Summary of the Invention
[0005] This application provides a shooting method, an electronic device, a readable storage medium, and a program product. The method can increase the display frame rate of captured images, thereby improving the smoothness of image display when zooming in low-light scenes.
[0006] In a first aspect, this application provides a shooting method applied to an electronic device. The method includes: displaying a shooting preview screen; detecting a user's zoom operation; determining whether the current shooting lighting conditions meet the adjustment conditions; and when the current shooting lighting conditions meet the adjustment conditions, displaying the zoomed shooting preview screen at a target frame rate, wherein the target frame rate is greater than a first frame rate, and the first frame rate is a frame rate determined by the electronic device based on the exposure time under the current shooting lighting conditions.
[0007] The adjustment conditions include, for example, those corresponding to low-light scenes. In this case, the adjustment conditions may include: the light intensity under the current shooting lighting conditions is less than a preset light intensity threshold. That is, if the light intensity meets the adjustment condition of being less than the preset light intensity threshold, the electronic device can determine that it is currently in a low-light scene.
[0008] Furthermore, if the electronic device detects a user's zoom operation in a low-light scene, it can display the shooting preview at a target frame rate greater than a first lower limit and greater than a first frame rate determined based on the current shooting lighting conditions. Compared to some embodiments that display the shooting preview based on a first frame rate or a first lower limit, this method displays the shooting preview at a higher frame rate, which can improve the smoothness of the shooting preview display.
[0009] In one possible implementation of the first aspect, displaying a scaled-down shooting preview at a target frame rate includes: adjusting a first lower limit of a preset frame rate range of the electronic device to a second lower limit, wherein the second lower limit is greater than the first lower limit; detecting that the first frame rate is less than the second lower limit, using the second lower limit as the target frame rate, and displaying the scaled-down shooting preview at the target frame rate.
[0010] In this method, after the electronic device detects the user's zooming operation in a low-light scene, it can increase the first lower limit value to a second lower limit value. If the first frame rate calculated based on the current shooting lighting conditions is less than the second lower limit value, the second lower limit value is used as the target frame rate, and the shooting preview is displayed at the target frame rate. Compared to the method of displaying the shooting preview at the first lower limit value when the first frame rate is less than the first lower limit value, this method uses a target frame rate greater than the first lower limit value, resulting in a higher display frame rate and smoother display.
[0011] In one possible implementation of the first aspect, displaying a scaled-down shooting preview at a target frame rate includes: detecting that the first frame rate is less than a first lower limit of a preset frame rate range of the electronic device, and displaying the scaled-down shooting preview at a target frame rate greater than the first lower limit.
[0012] In this method, after the electronic device detects the user's zooming operation in a low-light scene, it can first determine whether the first frame rate is less than a first lower limit. If so, the shooting preview is displayed at a target frame rate greater than both the first frame rate and the first lower limit. Compared to the method of displaying the shooting preview at the first lower limit when the first frame rate is less than the first lower limit, this method uses a target frame rate greater than the first lower limit, resulting in a higher display frame rate and smoother display.
[0013] In one possible implementation of the first aspect, the method further includes: if a first frame rate is detected to be greater than or equal to a first lower limit value, and the first frame rate is less than the average of the first lower limit value and the first upper limit value of a preset frame rate range, then the average value is used as the target frame rate, and the scaled shooting preview screen is displayed at the target frame rate.
[0014] In this method, if the electronic device determines that the first frame rate is greater than or equal to the first lower limit, it further determines whether the first frame rate is less than the average of the first and second lower limits. If so, the average value is used as the target frame rate. Compared to displaying the shooting preview at the first frame rate when the first frame rate is greater than or equal to the first lower limit, this method uses a target frame rate greater than the first frame rate, resulting in a higher display frame rate and smoother display of the shooting preview.
[0015] In one possible implementation of the first aspect, the target frame rate is less than or equal to a first upper limit of the preset frame rate range of the electronic device.
[0016] It's understandable that if the target frame rate is too high, for example, greater than the first upper limit of the preset frame rate range, the preview image displayed at the target frame rate will have more noise, making it look rough and distorted, thus affecting the quality of the preview image. Therefore, to ensure the quality of the preview image, the target frame rate can be less than or equal to the first upper limit of the preset frame rate range, thus guaranteeing the quality of the preview image.
[0017] In one possible implementation of the first aspect, the shooting preview screen displays a captured image, and the user's zoom operation is detected, including: detecting the user's sliding operation on the zoom control in the shooting preview screen; or, detecting the user's zoom operation on the captured image using two fingers; or, detecting the user's long press operation on a first button on the electronic device.
[0018] The scaling control could be, for example, Figure 1 The zoom bar 102 in the image refers to the user's sliding operation on the zoom control in the preview screen. Figure 1 The zoom bar 102 in the image is slidable. Additionally, a diagram illustrating how a user can zoom in and out of a captured image using two fingers can be found here. Figure 5 A user's long press on the first button on an electronic device can be understood as the user pressing and holding the button for an extended period of time. Figure 5 Button 104 in the middle is used to zoom in and out of the captured image.
[0019] In one possible implementation of the first aspect, the method further includes: determining the exposure time corresponding to the target frame rate, wherein the exposure time and the target frame rate are reciprocals of each other; determining the gain based on the exposure amount and exposure time corresponding to the current shooting lighting conditions; and shooting based on the exposure time and gain.
[0020] It is understandable that exposure is equal to the product of exposure time and gain. Therefore, after determining the exposure and exposure time corresponding to the current shooting lighting conditions, the gain corresponding to the exposure time can be determined, and the shooting can be performed based on the exposure time and gain. The shooting preview screen is then displayed at the target frame rate to ensure that the exposure corresponding to the target frame rate is the same as the exposure corresponding to the first frame rate, thus ensuring the display quality of the shooting preview screen.
[0021] Secondly, this application provides an electronic device comprising: one or more processors; one or more memories; the one or more memories storing one or more programs, which, when executed by one or more processors, cause the electronic device to perform the shooting method of the first aspect and any possible implementation thereof.
[0022] Thirdly, this application provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the shooting method of the first aspect and any possible implementation thereof.
[0023] Fourthly, this application provides a computer program product comprising: computer instructions that, when executed on an electronic device, cause the electronic device to perform the first aspect and any possible implementation of the shooting method of the first aspect.
[0024] The beneficial effects of the second to fourth aspects can be found in the first aspect and the beneficial effects of any possible implementation of the first aspect, and will not be repeated here. Attached Figure Description
[0025] Figure 1 According to some embodiments of this application, a schematic diagram of the interface of an electronic device's shooting preview screen is shown;
[0026] Figure 2A According to some embodiments of this application, a flowchart of an initial shooting method in a low-light scene is shown;
[0027] Figure 2B A schematic diagram of an exposure table is shown according to some embodiments of this application;
[0028] Figure 3A According to some embodiments of this application, a schematic flowchart of a shooting method is shown;
[0029] Figure 3B According to some embodiments of this application, a schematic diagram of a display interface including a zoom bar in an expanded state is shown;
[0030] Figure 4According to some embodiments of this application, another schematic diagram of a display interface including a zoom bar in an expanded state is shown;
[0031] Figure 5 According to some embodiments of this application, a schematic diagram is shown of zooming an image using two fingers;
[0032] Figure 6 According to some embodiments of this application, a schematic flowchart of a shooting method for increasing the display frame rate of a captured image by increasing a first lower limit value is shown.
[0033] Figure 7 According to some embodiments of this application, a schematic flowchart of another shooting method for increasing the display frame rate of captured images is shown;
[0034] Figure 8 According to some embodiments of this application, a schematic diagram of the frame rate change over time when an electronic device is in a low-light scaling state is shown.
[0035] Figure 9 According to some embodiments of this application, a schematic diagram of the frame rate change over time is shown when another electronic device is in a low-light scaling state.
[0036] Figure 10 According to some embodiments of this application, an interactive flowchart of another shooting method for increasing the display frame rate of captured images is shown;
[0037] Figure 11 According to some embodiments of this application, a comparative schematic diagram of an initial shooting method and the shooting method of this application is shown;
[0038] Figure 12 According to some embodiments of this application, a schematic diagram of the hardware structure of a mobile phone 10 is shown;
[0039] Figure 13 According to some embodiments of this application, a schematic diagram of the software structure of a mobile phone 10 is shown. Detailed Implementation
[0040] The illustrative embodiments of this application include, but are not limited to, shooting methods, electronic devices, readable storage media, and program products.
[0041] The following explains the technical terms used in the embodiments of this application.
[0042] (1) Exposure is used to measure how much light enters the camera of an electronic device.
[0043] (2) Exposure time refers to the time the shutter needs to be open in order to project light onto the photosensitive surface of the photosensitive material. The longer the exposure time, the more light is projected onto the photosensitive material of the camera, that is, the greater the exposure 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.
[0044] (3) Frame rate is used to express the rate at which the number of frames changes over time. Specifically, it refers to the number of frames per second (FPS) output by an electronic device. For example, if the frame rate is 60 FPS, it means that 60 frames of images are captured every second.
[0045] (4) Gain, in this application, refers to a measure of the light responsiveness of the camera of an electronic device. By adjusting the gain, the camera's sensitivity to light can be changed, thereby affecting the brightness of the captured image.
[0046] (5) Image noise refers to foreign pixels that should not appear in the captured image. Noise makes the captured image look rough and distorted, thus affecting the quality of the captured image.
[0047] (6) Illuminance is the luminous flux of visible light received by the camera of an electronic device per unit area, measured in lux. When light shines on the camera of an electronic device, the illuminance sensor in the electronic device can detect the magnitude of the ambient light intensity.
[0048] The relevant background information related to the embodiments of this application will be briefly described below.
[0049] It is understood that the shooting method provided in this application can be applied to electronic devices with shooting and image display functions. Electronic devices include, but are not limited to, mobile phones, smart TVs, wearable devices, tablets, computers with wireless transceiver capabilities, virtual reality (VR) devices, augmented reality (AR) devices, wireless devices in self-driving vehicles, wireless devices in remote medical surgery, wireless devices in smart homes, and so on.
[0050] Figure 1 A schematic diagram of the interface for a camera preview screen of an electronic device is shown. Figure 1In it, the shooting preview screen 100 includes a preview area 101, a zoom bar 102, a captured image 103, etc. Among them, the captured image 103 is displayed in the preview area 101 for the user to preview. Figure 1 The zoom bar 102 in it is in a non-expanded state and includes four zoom ratios, which are 0.5x, 1x, 2.5x, and 5x respectively, and Figure 1 the zoom ratio corresponding to the captured image 103 in it is 1x.
[0051] It can be understood that after the camera application is started, the auto exposure (AE) module inside the electronic device will determine the exposure time and gain required for the current shooting operation according to the shooting light conditions (such as light intensity, etc.) in the environment where 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 Figure 1 the captured image 103 as shown.
[0052] Compared with the bright light scene, the camera of the electronic device in the low light scene receives less light within the unit exposure time. If the same exposure time as in the bright light scene is still used at this time, the imaging brightness of the captured image obtained will be lower. Therefore, in the low light scene, the electronic device can increase the exposure time to improve the imaging brightness of the captured image in the low light scene. In addition, since the exposure time and the frame rate are reciprocal to each other, in the low light scene, the increase in the exposure time will cause the frame rate of the captured image during preview display to decrease.
[0053] It can be understood that the electronic device is set with a preset frame rate range [Fmin, Fmax], where Fmax is the first upper limit value of the preset frame rate range, and Fmin is the 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, it compares the frame rate F with the preset frame rate range [Fmin, Fmax]. If Fmin ≤ F ≤ Fmax, the captured image is processed and displayed based on the frame rate F, exposure time, and gain. If F < Fmin, the exposure time and gain are recalculated based on the first lower limit value Fmin, and then the captured image is processed and displayed based on the first lower limit value Fmin and the exposure time and gain corresponding to the first lower limit value Fmin.
[0054] As mentioned earlier, when a user zooms in on a captured image in a low-light environment, the preview screen needs to display multiple zoom levels of the captured image per unit time. Therefore, a high frame rate is required for the preview display. If the shooting is based on the first lower limit Fmin because the frame rate F is less than the first lower limit Fmin, the first lower limit Fmin will not be able to meet the high frame rate requirements of the zoom operation, resulting in stuttering when switching between captured images and reducing the smoothness of the image display.
[0055] Therefore, to solve the aforementioned technical problems, this application provides a shooting method. In this method, if the electronic device detects that a user is zooming in on a captured image in a low-light scene, it can display the captured image in the shooting preview at a target frame rate, where the target frame rate F1 is greater than the first frame rate F corresponding to the current exposure time. For example, the electronic device can add a first lower limit value Fmin as a second lower limit value Fmin'. Thus, if the first frame rate F is less than Fmin', the second lower limit value Fmin' is used as the target frame rate F1, and the captured image is displayed at the target frame rate F1. As another example, after obtaining the first frame rate F based on the exposure time, the electronic device determines 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 captured image is displayed based on a target frame rate F1 that is greater than the first lower limit value Fmin.
[0056] In the above scenario, the target frame rate F1 could be within the range of, for example, Favg - (Favg - Fmin) / 3 ≤ F1 ≤ Favg + (Fmax - Favg) / 3. Here, Favg is the average of Fmax and Fmin. For instance, if Fmax is 40 and Fmin is 10, then F1 could be in the range [20, 30]. It's understandable that if a lower frame rate is used during shooting, the display smoothness of the captured image in the preview screen will be lower; conversely, if a higher frame rate is used, the captured image will have higher noise levels, affecting the display quality. Therefore, displaying the shooting preview screen with a target frame rate F1 within the above range ensures both smooth display and high-quality captured images.
[0057] Furthermore, in some other embodiments, after the electronic device obtains a first frame rate F based on the exposure time, if it determines that the first frame rate F is greater than or equal to a 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, then the average value Favg is used as the target frame rate F1, and the captured image is displayed at the target frame rate F1.
[0058] It's understandable that even if the first frame rate F is greater than the first lower limit Fmin, it might still not meet the frame rate requirements for scaling operations in low-light scenes, causing stuttering in the captured images. However, when the frame rate is the average of Fmax and Fmin (Favg), it usually ensures smooth display and quality of the captured images. Therefore, when the first frame rate F is less than Favg, displaying the captured image based on Favg can improve both display smoothness and quality.
[0059] Before detailing the shooting method provided in the embodiments of this application, the specific process of displaying the captured image on an electronic device in a low-light scene is first described. See [link to documentation]. Figure 2A , Figure 2A A flowchart illustrating an initial shooting method using an electronic device in a low-light scene is shown. This method can be executed by an electronic device and may include the following steps:
[0060] 201: Displays the shooting preview screen.
[0061] It is understood that in this application, the user can launch the camera application by clicking the icon corresponding to the shooting application (e.g., a camera app) on the display screen of the electronic device. After the camera application is launched, the display screen of the electronic device can display the shooting preview screen and the captured image. The interface diagram of the shooting preview screen can be as described above. Figure 1 As shown in interface 100, the captured image can be as follows Figure 1 Image 103 is shown in the image.
[0062] 202: Determine if the current scene is dark.
[0063] If the judgment result is yes, that is, the electronic device is currently in a low-light scene, then proceed to step 203;
[0064] If the result is negative, meaning the electronic device is not currently in a dark scene, step 202 can be executed again at fixed intervals until the electronic device determines that it is currently in a dark scene, and then step 203 can be executed.
[0065] In this embodiment, after the electronic device detects that the camera application is displaying a shooting preview, it detects in real time whether the electronic device is in a low-light scene. The method for determining a low-light scene will be described in detail later and will not be repeated here.
[0066] 203: Determine the required exposure time, gain, and frame rate based on the current shooting lighting conditions in the low-light scene.
[0067] It is understandable that the exposure required by an electronic device to respond to a user's shooting operation varies depending on the environment in which the electronic device is located, resulting in different image brightness. Therefore, in some embodiments, the electronic device can determine the required exposure based on the shooting lighting conditions (such as light intensity) in the current low-light scene, and then determine the corresponding exposure time, gain, and frame rate based on the exposure.
[0068] The details of this step will be described later and will not be repeated here.
[0069] 204: Determine if the frame rate is within the preset frame rate range.
[0070] If the judgment result is yes, that is, the frame rate is within the preset frame rate range, then step 205 is executed to display the captured image based on the calculated frame rate, exposure time and gain;
[0071] If the determination result is negative, that is, the frame rate is not within the preset frame rate range, then step 206 is executed to further determine whether the frame rate is less than the first lower limit of the preset frame rate range.
[0072] 205: Display the captured image based on the calculated frame rate, exposure time, and gain.
[0073] In this application, displaying captured images based on frame rate, exposure time, and gain can be achieved by an electronic device responding to a user's shooting operation based on exposure time and gain, and displaying the captured images at a determined frame rate.
[0074] 206: Determine whether the frame rate is less than the first lower limit of the preset frame rate range.
[0075] If the judgment result is yes, that is, the frame rate is less than the first lower limit of the preset frame rate range, then step 207 is executed, and the captured image is displayed based on the first lower limit and the exposure time and gain corresponding to the first lower limit.
[0076] If the result is negative, meaning the frame rate is not less than the first lower limit of the preset frame rate range (e.g., the frame rate is greater than or equal to the first upper limit of the preset frame rate range), then the frame rate calculation is incorrect. You can then execute step 203 again to recalculate the exposure time, gain, and frame rate.
[0077] 207: Display the captured image based on the first lower limit value and the corresponding exposure time and gain.
[0078] The calculation method for the exposure time and gain corresponding to the first lower limit will be described in detail later.
[0079] In some embodiments, the way an electronic device determines the exposure time, gain, and frame rate based on the shooting lighting conditions may include the following steps 2031-2033.
[0080] 2031: Determine the required exposure for the current shooting based on the current lighting conditions of the environment.
[0081] In this embodiment, the electronic device can determine the required exposure for shooting based on the light intensity of the current environment to prevent weak image quality due to overexposure or underexposure. For example, the electronic device can input the current light intensity into a pre-trained exposure determination model and then obtain the output exposure based on the model. It is understood that the required exposure will vary depending on the environment in which the electronic device is located.
[0082] 2032: Determine the exposure time and gain based on the exposure required for the current shooting and the exposure meter.
[0083] In some embodiments, the exposure amount is the product of the exposure time and the gain.
[0084] In some embodiments, the exposure table includes a correspondence between exposure amount, exposure time, and gain. Figure 2B A schematic diagram of an exposure table is shown. (For example...) Figure 2B As shown, the horizontal axis represents gain, and the vertical axis represents exposure time. Figure 2B The four line segments in the diagram correspond to different exposure levels. This is understandable. Figure 2B The relationship between exposure time, gain, and exposure shown is a pre-set relationship based on the actual application scenario. In other words, exposure time, gain, and exposure can also have... Figure 2B The different correspondences shown are not limited in this application embodiment.
[0085] like Figure 2B As shown, when the required exposure is between 0 and 10, the specific exposure time and gain are determined using the relationship between the exposure time and gain corresponding to line segment 1. For example, if the required exposure is 8, based on line segment 1, the gain is 1. Since the exposure is equal to the product of the gain and the exposure time, the exposure time can be calculated to be 8 ms.
[0086] Similarly, when the required exposure is between 10 and 40, line segment 2 is used to determine the exposure time and gain. For example, if the required exposure is 20, based on line segment 2, the exposure time is 10 ms. Since the exposure is equal to the product of the gain and the exposure time, the gain can be calculated to be 2.
[0087] When the required exposure is between 40 and 80, line segment 3 is used to determine the exposure time and gain. When the required exposure is between 80 and 200, line segment 4 is used to determine the exposure time and gain, and so on. Since the specific methods for determining the exposure time and gain represented by line segments 3 and 4 are similar to those for determining the exposure time and gain represented by line segments 1 and 2 as described above, they will not be repeated here.
[0088] 2033: Frame rate is determined based on exposure time.
[0089] It's understandable that exposure time and frame rate are reciprocals. Therefore, once the exposure time is determined, the frame rate can also be determined.
[0090] It is understandable that the above Figure 2A The shooting method shown in the low-light scene can be called the initial shooting method.
[0091] The technical solutions in the embodiments of this application will be clearly and thoroughly described below with reference to the accompanying drawings. Figure 3A A schematic flowchart of a shooting method provided in this application is shown. This method can be applied to electronic devices, such as... Figure 3A As shown, the method may include the following steps:
[0092] 301: Displays the shooting preview screen.
[0093] It is understandable that the specific execution process of this step is similar to that of step 201 above, and will not be repeated here.
[0094] 302: Determine whether the user zoomed in or out of the shooting preview.
[0095] If the determination result is yes, that is, the electronic device determines that the user has zoomed in and out of the shooting preview screen, then step 303 is executed;
[0096] If the result is negative, meaning the electronic device determines that the user has not performed a zoom operation, step 302 can be executed again at fixed intervals until the electronic device determines that the user has performed a zoom operation, and then step 303 can be executed.
[0097] In this embodiment, the value of the fixed time is not limited; it can be set based on experience or flexibly adjusted according to the actual application scenario. For example, the electronic device can repeat step 302 every 0.5 seconds.
[0098] It's understandable that after determining the current low-light scene, the electronic device further determines whether the user has zoomed in or out of the preview image. See also Figure 1 The zoom operation for the shooting preview screen can be used to zoom in and out. Figure 1Zooming operation of the captured image 103 displayed in the shooting preview screen 100.
[0099] This application does not limit the user's zooming operation method. For example, the user can zoom in and out of the captured image by sliding the zoom bar; this zooming operation can be called single-finger zooming. Figure 3B This diagram illustrates an interface with a zoom bar that includes an expanded state. Compared to... Figure 1 The zoom bar 102 in the non-expanded state. Figure 3B The zoom bar 102 (as an example of a zoom control) is in an expanded state, and Figure 3B The current zoom level displayed is 1x.
[0100] This application does not limit the manner in which the zoom bar 102 changes from a non-expanded state to an expanded state. For example, a user can long-press... Figure 1 The zoom bar 102 in the non-expanded state will then change to... Figure 3B The expanded state is shown. Alternatively, users can simply swipe. Figure 1 The zoom bar 102 in the non-expanded state will also change to [a different state]. Figure 3B The unfolded state shown.
[0101] Once the zoom bar 102 is expanded, users can slide it left or right to change the zoom level. Figure 3B On the basis of, such as Figure 4 As shown, users can slide the progress bar 102 to the right to change the zoom level from 1x to 0.5x.
[0102] For example, such as Figure 5 As shown, users can also zoom in and out of the captured image using two fingers. This zooming operation can be called two-finger zoom.
[0103] For example, users can also... Figure 5 Pressing and holding button 104 (as an example of the first button) allows for zooming of the captured image 103.
[0104] It is understandable that regardless of which method the user uses to zoom, the electronic device can determine whether the user has performed a zoom operation based on the change in zoom level.
[0105] This application does not limit the method by which the electronic device determines the scaling operation based on the scaling factor. For example, if the electronic device detects a scaling factor of a1 for the captured image at time t1, detects a scaling factor of a2 for the captured image at time t2, and does not detect a cessation of the scaling operation between times t1 and t2, then it can be determined that the user performed a scaling operation between times t1 and t2. The cessation of the scaling operation includes, but is not limited to, the user's finger leaving the display screen, the user releasing a button or control used to adjust the scaling factor, or a change in the number of fingers the user touched on the display screen.
[0106] In some embodiments, a change in the number of fingers a user touches on the display screen can be, for example, when a user is using two fingers to zoom, one finger stops touching the display screen, thus changing the number of fingers and allowing the electronic device to determine that the zoom operation has ended. Another example is when a user is using one finger to zoom, and then changes from sliding the zoom bar with one finger to touching the zoom bar with two fingers; in this case, the number of fingers changes, and the electronic device can also determine that the zoom operation has ended.
[0107] 303: Determine whether the current shooting lighting conditions meet the adjustment requirements.
[0108] If the judgment result is yes, that is, the current shooting lighting conditions meet the adjustment conditions, then proceed to step 304;
[0109] If the judgment result is negative, meaning the current shooting lighting conditions do not meet the adjustment conditions, then proceed to step 305, and execute the previous steps. Figure 2A The initial shooting method shown.
[0110] It is understood that determining whether the current shooting lighting conditions meet the adjustment conditions is equivalent to determining whether the current scene is in low light. This application does not limit the parameters reflecting the current shooting lighting conditions; for example, it can be light intensity. Taking light intensity as an example, the adjustment condition can be that the light intensity is less than a preset threshold (e.g., a preset light intensity threshold). In other words, when the light intensity is less than the preset threshold, it is determined that the current scene is in low light.
[0111] It's understandable that if the parameter reflecting the current shooting lighting conditions is something else, then the adjustment condition could also be that the value of the corresponding parameter is greater than a preset threshold. In other words, when the value of the corresponding parameter is greater than the preset threshold, it is determined that the current scene is low-light, etc.
[0112] It is understood that this application does not limit the execution order of steps 302 and 303. For example, the electronic device may first determine whether the current shooting lighting conditions meet the adjustment conditions, and if so, then determine whether the user has performed a zoom operation on the shooting preview screen.
[0113] 304: Displays a scaled-down preview of the shot at the target frame rate, which is greater than the first frame rate.
[0114] Here, the first frame rate F is the initial exposure time determined by the electronic device based on the current shooting lighting conditions (such as light intensity), and then the initial frame rate determined based on the initial exposure time. The method for determining the first frame rate F can be found in steps 2031-2033 above. The preset frame rate range is a frame rate range preset inside the electronic device, such as the preset frame rate range [Fmin, Fmax] mentioned above, in which case the first lower limit of the preset frame rate range is Fmin.
[0115] 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'. Thus, when 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 preview screen can be 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 screen is displayed based on the first frame rate F.
[0116] In the second embodiment, after determining the first frame rate F, if the electronic device determines that the first frame rate F is less than a first lower limit value Fmin, then it displays the shooting preview screen at a target frame rate F1 that is greater than the first lower limit value Fmin. The target frame rate F1 can fall within a preset frame rate range [Fmin, Fmax].
[0117] Furthermore, if the first frame rate F is greater than or equal to the first lower limit Fmin, the shooting preview can also be displayed at a target frame rate F1, which is greater than the first frame rate F. Details will be described in detail later and will not be elaborated here.
[0118] 305: Perform the initial shooting method.
[0119] As you can understand, the specific details of the initial shooting method in this step can be found in the previous text. Figure 2A And related descriptions.
[0120] Compared to displaying the shooting preview at the first lower limit Fmin when the first frame rate F is less than the first lower limit Fmin, this method can display the shooting preview based on a target frame rate F1 that is larger than both the first frame rate F and the first lower limit Fmin, thereby increasing the display frame rate of the shooting preview and thus increasing the smoothness of the captured image display.
[0121] The first embodiment described above, namely, increasing the display frame rate by increasing the first lower limit value Fmin, will be described in detail below. Figure 6An embodiment of this application illustrates a flowchart of a shooting method that increases the display frame rate of a captured image by increasing a first lower limit value. Figure 6 As shown, the process includes, but is not limited to, the following steps:
[0122] 601: Displays the shooting preview screen.
[0123] 602: Determine whether the user zoomed in or out of the shooting preview.
[0124] If the determination result is yes, that is, the electronic device determines that the user has zoomed in and out of the shooting preview screen, then proceed to step 603;
[0125] If the determination result is negative, that is, the electronic device determines that the user has not performed a zoom operation, the electronic device can execute step 602 again at fixed intervals until the electronic device determines that the user has performed a zoom operation and executes step 603.
[0126] 603: Determine if the current scene is in low light.
[0127] If the judgment result is yes, that is, the electronic device determines that it is currently in a low-light scene, then proceed to step 605;
[0128] If the judgment result is negative, meaning the electronic device determines that it is not currently in a low-light scene, then proceed to step 604. Figure 2A The initial shooting method shown.
[0129] It is understood that the specific execution process of steps 601-603 above is similar to the specific execution process of the corresponding steps in steps 301-303 above, and will not be repeated here.
[0130] 604: Perform initial shooting method.
[0131] 605: Raise the first lower limit value to the second lower limit value.
[0132] In this embodiment of the application, after the electronic device determines that the user is performing a zoom operation in a low-light scene, it can raise the first lower limit value Fmin of the preset frame rate range [Fmin, Fmax] to the second lower limit value Fmin'. The second lower limit value Fmin' belongs to the preset frame rate range [Fmin, Fmax].
[0133] In this embodiment, the range of the second lower limit value Fmin' can be Favg-(Favg-Fmin) / 3≤Fmin'≤Favg+(Fmax-Favg) / 3. Here, Favg is the average of Fmax and Fmin. For example, if Fmax is 40 and Fmin is 10, then the range of Fmin' can be [20, 30]. It is understood that if the frame rate used during shooting is low, the display smoothness of the captured image in the shooting preview screen will be low; if the frame rate used is high, the noise level of the captured image will be high, affecting the display quality of the captured image. Therefore, displaying the shooting preview screen with the second lower limit value Fmin' within the above range can ensure both display smoothness and the quality of the displayed captured image.
[0134] It is understood that the range of values for the second lower limit Fmin' mentioned above is merely an example and does not constitute a limitation on all embodiments of this application. The range can be set based on experience or flexibly adjusted based on actual application scenarios.
[0135] 606: Calculate the first exposure time, first gain, and first frame rate required for the current low-light scene based on the exposure table.
[0136] Here, the first exposure time and the first gain are the initial exposure time and initial gain required by the electronic device based on the current shooting lighting conditions (such as light intensity) in the low-light scene. The first frame rate F is the initial frame rate determined by the electronic device based on the current shooting lighting conditions (such as light intensity) and the initial exposure time (i.e., the first exposure time).
[0137] The specific execution process of this step is similar to that of the corresponding steps in steps 2031-2033 above, and will not be repeated here.
[0138] 607: Determine if the first frame rate is less than the second lower limit.
[0139] If the judgment result is yes, that is, the first frame rate F is less than the second lower limit Fmin', then step 608 is executed, the second lower limit is taken as the target frame rate F1, and the target exposure time and target gain corresponding to the target frame rate F1 are recalculated.
[0140] If the judgment result is negative, that is, the first frame rate F is not less than the second lower limit Fmin', then step 610 is executed to display the captured image based on the first exposure time, the first gain and the first frame rate F.
[0141] It is understandable that when the first frame rate F is less than the second lower limit Fmin', the electronic device can determine the second lower limit 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 redefined. If the exposure remains constant, and the exposure time is redefined, the gain also needs to be redefined. Therefore, the target exposure time and target gain corresponding to the target frame rate F1 need to be redefined.
[0142] 608: Use the second lower limit as the target frame rate, and calculate the target exposure time and target gain corresponding to the target frame rate.
[0143] For example, after the electronic device uses the second lower limit value as the target frame rate, it can further determine the target exposure time corresponding to the target frame rate F1. It can be understood that the target exposure time is the reciprocal of the target frame rate F1.
[0144] Furthermore, since the exposure amount is the product of the exposure time and the gain, once 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.
[0145] It is understandable that in this method, displaying the captured image based on a target frame rate F1 that is larger than the first lower limit Fmin can increase the smoothness of the image display. Furthermore, by adjusting the gain, the exposure remains unchanged before and after the frame rate adjustment, thus ensuring that the image brightness remains constant. In summary, this method improves both the smoothness and brightness of the captured image, thereby enhancing the display quality.
[0146] 609: Display captured images based on target exposure time, target gain, and target frame rate.
[0147] It is understandable that the electronic device responds to the user's shooting operation based on the obtained target exposure time and target gain, and displays the captured image at the target frame rate F1.
[0148] 610: Display the captured image based on the first exposure time, first gain, and first frame rate.
[0149] It is understandable that the electronic device responds to the user's shooting operation based on the obtained first exposure time and first gain, and displays the captured image at a first frame rate F.
[0150] Figure 7 A flowchart illustrating another shooting method that increases the display frame rate of captured images by increasing a first lower limit of a preset frame rate range is shown. Figure 7 As shown, the process includes, but is not limited to, the following steps:
[0151] 701: Displays the shooting preview screen.
[0152] 702: Determine if the user has performed a zoom operation.
[0153] If the determination result is yes, that is, the electronic device determines that the user has performed a zoom operation on the shooting preview screen, then step 703 is executed to determine whether the user has performed a zoom operation on the shooting preview screen.
[0154] If the determination result is negative, that is, the electronic device determines that the user has not performed a zoom operation, the electronic device can execute step 702 again at fixed intervals until the electronic device determines that the user has performed a zoom operation and executes step 703.
[0155] 703: Determine if the current scene is in low light.
[0156] If the judgment result is yes, that is, the electronic device determines that it is currently in a low-light scene, then proceed to step 704;
[0157] If the result is negative, meaning the electronic device determines that it is not in a low-light scene, then proceed to step 705.
[0158] It is understood that the specific execution process of steps 701-703 above is similar to the specific execution process of the corresponding steps in steps 301-303 above, and will not be repeated here.
[0159] 704: Increase the first lower limit value Fmin and increase the gain to keep the image brightness unchanged.
[0160] It is understandable that if the electronic device determines that the user is performing a zoom operation, it can raise the first lower limit value Fmin of the preset frame rate range to the second lower limit value Fmin'. Thus, after the electronic device determines the required first frame rate F based on the current shooting lighting conditions, if it determines that the first frame rate F is less than the second lower limit value Fmin', it can use the second lower limit value Fmin' as the target frame rate F1 and display the captured image at the target frame rate F1.
[0161] The target frame rate F1 is greater than the first lower limit Fmin, and since frame rate and exposure time are reciprocals, the exposure time corresponding to the target frame rate F1 is shorter than the exposure time corresponding to the first lower limit Fmin. With the same exposure, the target gain corresponding to the target frame rate F1 is greater than the gain corresponding to the first lower limit Fmin. Therefore, when displaying the captured image at the target frame rate F1, the gain of the captured image increases. Furthermore, since the exposure is the same, by increasing the first lower limit and correspondingly increasing the gain, the electronic device can maintain the same image brightness.
[0162] The specific execution process of this step is similar to that of the corresponding steps in steps 605-609 above, and will not be repeated here.
[0163] 705: Keep the first lower limit value Fmin and the gain unchanged so that the imaging brightness of the captured image remains unchanged.
[0164] It is understandable that the specific execution process of this step is similar to that of the corresponding steps in steps 203-207 above, and will not be repeated here.
[0165] 706: Send the captured image to the display.
[0166] It is understood that after the electronic device obtains the captured image based on step 704 or step 705 above, it can display the captured image on, for example... Figure 1 In the shooting preview screen 100, the image to be captured is about to be displayed.
[0167] Figure 8 This diagram illustrates the change in frame rate over time when an electronic device is in a low-light scaling state.
[0168] Figure 8 The corresponding preset frame rate range is [10, 30], meaning the first lower limit of the preset frame rate range is 10, and the first upper limit is 30. For example... Figure 8 As shown, the horizontal axis represents time, and the left vertical axis represents the display frame rate of the captured image at different times within a preset frame rate range of [10, 30]. The curve showing the change in the display frame rate of the captured image over time is shown below. Figure 8 The curve m1 is shown in the figure. For example, see curve m1. Figure 8 During the period from the 1st second to the 6th second, the electronic device transitions from a bright light scene to a dark light scene. As mentioned earlier, the display frame rate of the image captured by the electronic device gradually decreases during this process. At the 6th second, the electronic device is already in a dark light scene, and the current required frame rate (an example of a first frame rate) determined by the electronic device based on the current lighting conditions of the dark scene is less than a first lower limit of 10 within a preset frame rate range. Therefore, the captured image is displayed based on the first lower limit of 10. Figure 8 The frame rate of the captured image at the 6th second is 10.
[0169] Figure 9 This diagram illustrates the change in frame rate over time when another electronic device is in a low-light scaling state.
[0170] exist Figure 9 In this context, the change in the display frame rate of the captured image over time can be illustrated by curve m2. For example, see... Figure 9 The preset frame rate range for the period from the 1st to the 8th second is [10, 30], based on and Figure 8Similarly, at the 6th second, the displayed frame rate of the captured image is the first lower limit of the preset frame rate range, which is 10. If the electronic device detects that the user performs a zoom operation at the 8th second, it adjusts the first lower limit of the preset frame rate range from 10 to the second lower limit, which is 15. Taking the 11th second as an example, at this time, the electronic device, based on the current shooting lighting conditions of the scene, determines that the current required frame rate (an example of the first frame rate) is less than the modified second lower limit of the preset frame rate range, which is 15. Therefore, the captured image is displayed based on the modified second lower limit, which is 15 (i.e., the target frame rate). Figure 9 The frame rate of the captured image at the 11th second is 15.
[0171] based on Figure 8 and Figure 9 It can be seen that by increasing the first lower limit of the preset frame rate range, when the current required first frame rate is less than the increased second lower limit, the second lower limit can be used as the target frame rate, and the captured image can be displayed at the target frame rate, which can improve the display smoothness of the captured image.
[0172] The second embodiment, namely, displaying the captured image at a target frame rate greater than the first lower limit when the first frame rate is less than the first lower limit of the preset frame rate range, will be described in detail below. Figure 10 An interactive flowchart of another shooting method for increasing the display frame rate of captured images is shown according to an embodiment of this application. Figure 10 As shown, this process is based on the interaction between the camera application, the judgment module, and the automatic exposure module of the electronic device. This process includes, but is not limited to, the following steps:
[0173] 1001: The camera app displays a shooting preview.
[0174] 1002: The camera application sends the display status of the shooting preview screen to the judgment module.
[0175] 1003: The judgment module determines whether the user zooms in or out of the shooting preview screen.
[0176] It is understandable that after the determination module receives the display status of the shooting preview screen sent by the camera application, that is, after determining that the camera application is displaying the shooting preview screen, it can execute step 1003, that is, further determine whether the user has performed a zoom operation.
[0177] If the result is yes, that is, the electronic device determines that the user has zoomed in on the shooting preview, then step 1004 is executed to determine whether the current scene is a low-light scene.
[0178] If the determination result is negative, that is, the electronic device determines that the user has not performed a zoom operation, the electronic device can execute step 1003 again at fixed intervals until the electronic device determines that the user has performed a zoom operation, and then execute step 1004.
[0179] 1004: The judgment module determines whether the current scene is in low light.
[0180] If the judgment result is yes, that is, the electronic device determines that it is currently in a low-light scene, then proceed to step 1006;
[0181] If the judgment result is negative, meaning the electronic device determines that it is not currently in a low-light scene, then proceed to step 1005. Figure 2A The initial shooting method shown.
[0182] It is understood that the specific execution process of steps 1001-1004 above is similar to the specific execution process of the corresponding steps in steps 301-303 above, and will not be repeated here.
[0183] 1005: The automatic exposure module executes the initial shooting method.
[0184] 1006: The automatic exposure module calculates the first exposure time, first gain, and first frame rate required for the current low-light scene based on the exposure table.
[0185] The specific execution process of this step is similar to that of step 606 above, and will not be repeated here.
[0186] 1007: The automatic exposure module sends the first frame rate to the judgment module.
[0187] 1008: The judgment module determines whether the first frame rate is less than the first lower limit of the preset frame rate range.
[0188] If the judgment result is yes, that is, the first frame rate F is less than the first lower limit value Fmin of the preset frame rate range, then proceed to step 1009;
[0189] If the judgment result is negative, that is, the first frame rate F is not less than the first lower limit value Fmin of the preset frame rate range, then step 1010 is executed.
[0190] 1009: Respond to the user's shooting operation based on the target exposure time and target gain corresponding to the target frame rate that is greater than the first lower limit, and display the captured image at the target frame rate.
[0191] In this embodiment, the target frame rate F1 can be in the range of Favg-(Favg-Fmin) / 3≤F1≤Favg+(Fmax-Favg) / 3. It should be understood that the above range of the target frame rate F1 is merely an example and does not constitute a limitation on all embodiments of this application. The range can be set based on experience or flexibly adjusted based on the actual application scenario.
[0192] It is understandable that the specific execution process of determining the target exposure time and target gain based on the target frame rate F1 is similar to the specific execution process of step 608 above, and will not be repeated here.
[0193] In the above scheme, if the first frame rate F is less than the first lower limit Fmin, the captured image is displayed based on a target frame rate F1 that is greater than Fmin. Compared to some embodiments where the captured image is displayed based on Fmin when the first frame rate F is less than the first lower limit Fmin, in this scheme, the target frame rate F1 for displaying the captured image is greater than Fmin, resulting in smoother display of the captured image during scaling operations.
[0194] 1010: The judgment module determines whether the first frame rate is less than the average of the first lower limit and the first upper limit.
[0195] If the judgment result is yes, that is, the first frame rate F is less than the average value of the first lower limit and the first upper limit Favg, then proceed to step 1011;
[0196] If the judgment result is negative, that is, the first frame rate F is greater than or equal to the average value Favg of the first lower limit and the first upper limit, then proceed to step 1012.
[0197] 1011: Use the average value as the target frame rate, and respond to the user's shooting operation based on the target exposure time and target gain corresponding to the target frame rate, and display the captured image at the target frame rate.
[0198] The specific execution process of determining the target exposure time and target gain corresponding to the target frame rate based on the target frame rate is similar to the specific execution process of step 608 above, and will not be repeated here.
[0199] It's understandable that even if the first frame rate F is greater than the first lower limit Fmin, it might still not meet the frame rate requirements for scaling operations in low-light scenes, causing stuttering in the captured images. However, when the frame rate is the average of Fmax and Fmin (Favg), the smoothness and display quality of the captured images are usually guaranteed. Therefore, when the first frame rate F is less than Favg, the average Favg can be used as the target frame rate, and the captured images can be displayed based on the target frame rate to ensure smoothness and display quality.
[0200] 1012: Based on the first exposure time and first gain corresponding to the first frame rate, respond to the user's shooting operation and display the captured image at the first frame rate.
[0201] Figure 11 A comparative schematic diagram of an initial shooting method and the shooting method of this application is shown. For example... Figure 11 As shown, in the initial shooting method, if the electronic device moves from a bright scene to a dark scene at time t3, based on the previous description, the electronic device will reduce the frame rate to improve the brightness of the captured image. If the electronic device detects that the user zooms in on the captured image in a dark scene at time t4, it will still reduce the frame rate to improve the brightness of the captured image.
[0202] In the shooting method provided in this application, if the electronic device detects that the user is scaling the captured image in a low-light scene, the frame rate will be increased. For example, after calculating the first frame rate F, the first lower limit value Fmin of the preset frame rate range is increased to the 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 used as the target frame rate F1, and the captured image can be displayed at the target frame rate F1. As another example, after calculating the first frame rate F, if the first frame rate F is less than the first lower limit value Fmin of the preset frame rate range, the captured image is 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 accordingly to improve the imaging brightness of the captured image, thereby ensuring that the imaging brightness is the same before and after scaling.
[0203] Therefore, the method provided in this application can not only increase the smoothness of the display of captured images by increasing the frame rate, but also ensure that the imaging brightness of the captured images before and after scaling is the same, thus ensuring the display quality of the captured images.
[0204] This application provides an electronic device comprising: one or more processors; one or more memories; and one or more memories storing one or more programs. When one or more programs are executed by one or more processors, the electronic device performs the shooting method described in the above embodiments. Furthermore, the relevant content regarding the electronic device to which the method provided in this application is applicable has been described in detail above and will not be repeated here.
[0205] This application also provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the shooting method described in the above embodiments.
[0206] This application also provides a computer program product, including: execution instructions, which are stored in a readable storage medium. At least one processor of the 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 shooting method involved in the above embodiments.
[0207] Figure 12 A schematic diagram of the structure of an electronic device (taking mobile phone 10 as an example) provided in an embodiment of this application is shown. It is understood that the electronic device can be any electronic device with at least two cameras, including but not limited to mobile phones, wearable devices (such as smartwatches, smart bracelets, etc.), tablet computers, desktop computers, laptop computers, handheld computers, netbooks, etc., and this application embodiment does not limit it.
[0208] The mobile phone 10 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging 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 speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 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 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity 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.
[0209] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the mobile phone 10. In other embodiments of this application, the mobile phone 10 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0210] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0211] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0212] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are being used repeatedly. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the aforementioned memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system. The processor can be used to execute the imaging method mentioned in this application.
[0213] The external storage interface 120 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100. The external storage card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external storage card.
[0214] 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.
[0215] The SIM card interface 195 is used to connect the SIM card.
[0216] Figure 13 A software structure block diagram of a mobile phone 10 according to an embodiment of this application is shown.
[0217] 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 layer, and application framework layer. The runtime system libraries, the hardware abstraction layer (HAL), and the kernel layer.
[0218] 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.
[0219] like Figure 13 As shown, 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, control center, and notification center. The camera application involved in this application resides in this application layer.
[0220] 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.
[0221] The application framework layer can include a camera service. When the camera application in the application layer detects user actions on the camera application (such as zooming), the camera application can send relevant operation information to the HAL layer through the camera service in the application framework layer.
[0222] The system library can include multiple functional modules. For example, a surface manager, a 2D graphics engine (e.g., SGL), etc.
[0223] The Hardware Abstraction Layer (HAL) serves as the interface between operating system software and hardware components, providing a platform for interaction between upper-layer software and lower-layer hardware. The HAL abstracts the underlying hardware into software containing corresponding hardware interfaces. By accessing the HAL, settings can be configured for the underlying hardware devices; for example, enabling or disabling relevant hardware components can be done within the HAL. In some embodiments, the core architecture of the HAL layer is constructed using at least one of C++ or C++.
[0224] The automatic exposure module involved in this application embodiment is located in Figure 13 The HAL layer is shown. The automatic exposure module is used to determine the exposure time, frame rate, and gain for the current scene.
[0225] The kernel layer is the layer between hardware and software. Figure 13 In the kernel layer, there are display drivers, camera drivers, audio drivers, sensor drivers, etc.
[0226] It is understood that, as used herein, the term “module” may refer to or include, or be part of, an application-specific integrated circuit (ASIC), electronic circuitry, a processor (shared, dedicated, or grouped) and / or memory that executes one or more software or firmware programs, combinational logic circuitry, and / or other suitable hardware components that provide the described functionality.
[0227] It is understood that in the various embodiments of this application, the processor may be a microprocessor, a digital signal processor, a microcontroller, etc., and / or any combination thereof. According to another aspect, the processor may be a single-core processor, a multi-core processor, etc., and / or any combination thereof.
[0228] The embodiments disclosed in this application can be implemented in hardware, software, firmware, or a combination of these implementation methods. Embodiments of this application can be implemented as computer programs or program code executable on a programmable system, the programmable system including 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.
[0229] Program code can be applied to input instructions to execute the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application-specific integrated circuit (ASIC), or a microprocessor.
[0230] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this application are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.
[0231] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored thereon on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed via a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine-readable (e.g., computer-readable) form, including but not limited to floppy disks, optical disks, CD-ROMs, magneto-optical disks, read-only memory (ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic cards or optical cards, flash memory, or tangible machine-readable storage for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in the form of electrical, optical, acoustic, or other propagation signals. Therefore, machine-readable media include any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine-readable (e.g., computer-readable) form.
[0232] In the accompanying drawings, some structural or methodological features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be necessary. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. Furthermore, the inclusion of structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may be omitted or may be combined with other features.
[0233] It should be noted that all units / modules mentioned in the device embodiments of this application are logical units / modules. Physically, a logical unit / module can be a physical unit / module, a part of a physical unit / module, or a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important factor; the combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed in this application. Furthermore, to highlight the innovative aspects of this application, the above-described device embodiments of this application have not introduced units / modules that are not closely related to solving the technical problems proposed in this application. This does not mean that the above-described device embodiments do not contain other units / modules.
[0234] It should be noted that in the examples and description of this application, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0235] Although this application has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art will understand that various changes in form and detail may be made thereto without departing from the scope of this application.
Claims
1. A shooting method, characterized in that, Applied to electronic devices, the method includes: Displays a preview of the shooting action; The user's zoom action was detected; Determine whether the current shooting lighting conditions meet the adjustment requirements; When the current shooting lighting conditions meet the adjustment conditions, the scaled shooting preview is displayed at a target frame rate, where the target frame rate is greater than a first frame rate, which is the frame rate determined by the electronic device based on the exposure time under the current shooting lighting conditions.
2. The method according to claim 1, characterized in that, The adjustment conditions include: The light intensity under the current shooting lighting conditions is less than the preset light intensity threshold.
3. The method according to claim 2, characterized in that, The method of displaying the scaled-down preview image at the target frame rate includes: The first lower limit of the preset frame rate range of the electronic device is adjusted to a second lower limit, wherein the second lower limit is greater than the first lower limit. If the first frame rate is detected to be less than the second lower limit, the second lower limit is used as the target frame rate, and the scaled shooting preview is displayed at the target frame rate.
4. The method according to claim 2, characterized in that, The method of displaying the scaled-down preview image at the target frame rate includes: If the first frame rate is detected to be less than a first lower limit of the preset frame rate range of the electronic device, the scaled-up shooting preview screen is displayed at the target frame rate, which is greater than the first lower limit.
5. The method according to claim 4, characterized in that, The method further includes: If the first frame rate is detected to be greater than or equal to the first lower limit, and the first frame rate is less than the average of the first lower limit and the first upper limit of the preset frame rate range, then the average value is used as the target frame rate, and the scaled shooting preview is displayed 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 the 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 screen displays the captured image, and the detection of the user's zoom operation includes: The system detects a user's sliding action on the zoom controls in the shooting preview screen; or, The system detects that the user zoomed in or out on the captured image using two fingers; or, A long press operation by the user on the first button on the electronic device was detected.
8. The method according to claim 7, characterized in that, The method further includes: Determine the exposure time corresponding to the target frame rate, wherein the exposure time and the target frame rate are reciprocals of each other; The gain is determined based on the exposure amount and exposure time corresponding to the current shooting lighting conditions; The image is taken based on the exposure time and the gain.
9. An electronic device, characterized in that, include: One or more processors; One or more memories; the one or more memories store one or more programs that, when executed by the one or more processors, cause the electronic device to perform the shooting method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the shooting method according to any one of claims 1 to 8.
11. A computer program product, characterized in that, include: Computer instructions, when executed on an electronic device, cause the electronic device to perform the photographing method according to any one of claims 1 to 8.