A shooting method and electronic device

By automatically adjusting the exposure time based on the user's shutter trigger frequency, the problem of cumbersome manual adjustment and inaccurate motion detection in existing technologies is solved, thus improving the shooting experience and image quality.

CN122476262BActive Publication Date: 2026-11-17SHANGHAI GLORY SMART TECH DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610976369.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-01
Publication Date
2026-11-17
Estimated Expiration
2046-07-01

AI Technical Summary

Technical Problem

In existing technologies, manually adjusting the exposure time is cumbersome and time-consuming, making it easy to miss exciting moments and affecting the shooting experience. Furthermore, inaccurate motion detection results can lead to untimely exposure time adjustments.

Method used

By detecting the user's shutter trigger frequency, the system automatically adjusts the exposure time. When the shutter trigger frequency is high, it takes a short exposure time, and when the frequency is low, it takes a long exposure time. The system also adjusts the exposure time based on the ambient light level.

Benefits of technology

It simplifies user operation, improves the shooting experience, reduces the possibility of missing wonderful moments, and ensures consistent image clarity and brightness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122476262B_ABST
    Figure CN122476262B_ABST
Patent Text Reader

Abstract

This application provides a shooting method and an electronic device that can actively shorten the exposure time when a user wants to shoot a moving object, thereby reducing motion blur. The method includes: displaying a shooting preview interface for real-time display of image frames captured by the electronic device; receiving a first operation at a first moment, the first operation triggering the electronic device to shoot; and, in response to the first operation, taking a picture with a first exposure time that is greater than or equal to a first preset frequency, wherein the first exposure time is less than a second exposure time, the second exposure time is the exposure time of the electronic device at the first moment, the first frequency is the frequency at which the electronic device receives the first operation within a first time period, the first time period ends at the first moment, and the duration of the first time period is a preset duration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to a shooting method and electronic device. Background Technology

[0002] With the continuous development of photography technology and the widespread use of electronic devices, the photography function of electronic devices is becoming increasingly popular. When shooting different types of subjects, people can adjust the shutter speed. For example, when shooting moving subjects, people can increase the shutter speed to shorten the exposure time, thereby avoiding image blur and making the image clearer.

[0003] In related technologies, electronic devices allow users to adjust the exposure time. For example, the electronic device can adjust the exposure time after receiving a user's command to activate the snapshot function or a user's command to manually set the shutter speed. However, manually adjusting the exposure time is cumbersome and time-consuming, and users cannot take pictures while manually adjusting the exposure time, which may cause them to miss exciting moments and affect their shooting experience. Summary of the Invention

[0004] This application provides a shooting method and electronic device that can adjust the exposure time according to the frequency at which the user triggers the electronic device to take pictures, without requiring the user to adjust the exposure time separately and without interrupting the user's shooting, thereby improving the user's shooting experience.

[0005] To achieve the above objectives, the embodiments of this application adopt the following technical solutions: Firstly, this application provides a shooting method applied to an electronic device. The electronic device can display a shooting preview interface, which is used to display image frames captured by the electronic device in real time. The electronic device can receive a first operation to trigger shooting. In response to the first operation, the electronic device can acquire a first frequency, and if the first frequency is greater than or equal to a first preset frequency, it can shoot with a first exposure time. The first exposure time is less than a second exposure time, where the second exposure time is the exposure time at the moment the electronic device receives the first operation (e.g., a first instant), the first frequency is the frequency at which the electronic device receives the first operation within a first time period, the first time period ends at the first instant, and the duration of the first time period is a preset duration.

[0006] It should be understood that the first exposure frequency can reflect the user's shooting intention. A higher first exposure frequency indicates that the user has recently triggered the shutter button by repeatedly and rapidly clicking it or otherwise, meaning the user wants the electronic device to take multiple images in succession, indicating an intention to capture moving scenes. In this case, the electronic device can proactively shoot with a shorter first exposure time, resulting in a clearer image, reducing or eliminating motion blur, and eliminating the need for manual interruption of the shooting process by the user. This makes it easier for the user to capture exciting moments in moving scenes.

[0007] In one design provided in the first aspect, when the first frequency is less than the first preset frequency, the electronic device takes a picture with a second exposure time. That is, the electronic device can identify the user's shooting intention through the first frequency and adjust the exposure time accordingly. When the user is shooting a moving object, they are likely to perform the first operation continuously and quickly, which will cause the first frequency to be greater than or equal to the first preset frequency, thus allowing the electronic device to take a picture with a shorter first exposure time to reduce motion blur. When the user is shooting a static object, they are likely to perform the first operation at a lower frequency due to adjustments in composition, lighting, etc., which will cause the first frequency to be less than the first preset frequency, thus allowing the electronic device to take a picture with a longer second exposure time to obtain a more detailed image.

[0008] In one design provided in the first aspect, the second exposure time is the base exposure time of the first moment, which is determined based on the ambient light intensity of the first moment.

[0009] In one design provided in the first aspect, the first exposure time is a candidate exposure time, which is determined based on a first frequency and a second exposure time. The candidate exposure time is inversely proportional to the first frequency and is within the effective exposure time range.

[0010] In one design provided in the first aspect, during the process of determining a candidate exposure time based on a first frequency and a second exposure time, the electronic device can determine a frequency weighting coefficient based on the first frequency, which is directly proportional to the first frequency. Then, the product of the second exposure time and a first difference is used as the candidate exposure time, where the first difference is the difference between 1 and the frequency weighting coefficient. This makes the candidate exposure time inversely proportional to the first frequency; that is, the more frequently the user triggers the shooting operation, the more the user wants to capture moving objects, and the electronic device will shoot with a shorter exposure time, improving image clarity.

[0011] In one design provided in the first aspect, when the first frequency is greater than or equal to a first preset frequency, the electronic device can further determine a first ISO and take a picture with a first exposure time and the first ISO. The ratio between the first ISO and the second ISO is equal to the ratio between the second exposure amount and the first exposure amount, where the second ISO is the ISO corresponding to the second exposure time, the first exposure amount is the exposure amount corresponding to the first exposure time, and the second exposure amount is the exposure amount corresponding to the second exposure time. This avoids changes in image brightness caused by adjusting the exposure time, ensuring consistent image brightness before and after the exposure time adjustment.

[0012] In one design provided in the first aspect, when the first frequency is greater than or equal to the first preset frequency, the electronic device can continuously acquire and display a first preview image for a first exposure time until the end of the second time period or a second operation is received within the preset time period. In this way, the electronic device can also acquire a preview image for an exposure time of 1 within a certain time period and display the preview image in the shooting preview interface, thereby reducing motion blur in the preview image.

[0013] Secondly, this application also provides an electronic device, which includes: a memory, one or more processors, and a camera; the memory, the camera, and the processor are coupled; wherein the memory is used to store computer program code, the computer program code including computer instructions; when the computer instructions are executed by the processor, the electronic device performs the method provided by the first aspect and any of its designs.

[0014] Thirdly, this application provides a computer-readable storage medium including computer instructions; when the computer instructions are executed on an electronic device, they cause the electronic device to perform the method provided by the first aspect and any of its designs.

[0015] Fourthly, this application provides a computer program product that, when run on an electronic device, causes the electronic device to perform the method provided by the first aspect and any of its designs.

[0016] The technical effects of any of the design methods in the second to fourth aspects can be found in the technical effects of different design methods in the first aspect, and will not be repeated here. Attached Figure Description

[0017] Figure 1 A schematic diagram of a shooting scene provided for an embodiment of this application; Figure 2 This is a sampling diagram of a pixel array provided in an embodiment of this application; Figure 3 A set of interface diagrams provided for related technologies; Figure 4 Another set of interface diagrams provided for related technologies; Figure 5 A hardware structure block diagram of an electronic device provided in an embodiment of this application; Figure 6 A software architecture block diagram of an electronic device provided in an embodiment of this application; Figure 7 A flowchart illustrating a shooting method provided in an embodiment of this application; Figure 8 A set of interface diagrams provided for embodiments of this application; Figure 9 Another set of interface diagrams provided for embodiments of this application; Figure 10 An interactive diagram of a software module provided in an embodiment of this application; Figure 11 This is a timing diagram related to a shooting method provided in an embodiment of this application. Detailed Implementation

[0018] The technical solutions of the embodiments of this application are described below with reference to the accompanying drawings. In the description of the embodiments of this application, the terminology used in the following embodiments is for the purpose of describing specific embodiments only and is not intended to limit the application. As used in the specification and appended claims of this application, the singular expressions "a," "the," "the," "the," and "this" are intended to also include expressions such as "one or more," unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, "at least one" and "one or more" refer to one or more (including two). The term "and / or" is used to describe the relationship between related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.

[0019] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized. The term "connection" includes direct connections and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.

[0020] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.

[0021] Before introducing the specific embodiments of this application, a brief introduction to the technical terms involved in this application will be given: Exposure time refers to the time interval between when the shutter opens and when it closes. During this time, light continuously shines on the image sensor to form an image.

[0022] Shutter speed is a parameter that controls the length of time light enters the image sensor. Shutter speed and exposure time are numerically equal and can be used as the same concept in photography; however, the logical relationship is one of shortness and speed. A fast shutter speed corresponds to a short exposure time, resulting in less light and a darker image; a slow shutter speed corresponds to a long exposure time, resulting in more light and a brighter image. For example, if the shutter speed set on an electronic device is 1 / 500 second, then the exposure time is 1 / 500 second.

[0023] Motion blur is a motion effect in an image, generally caused by relative motion between the shooting device and the subject. When photographing a moving object, if the object's speed is too fast and the exposure time is too long, motion blur is likely to appear in the image. Motion blur results in noticeable blurred dragging marks in the image. It's understood that "shooting device" refers to electronic devices such as cameras and mobile phones; "subject" refers to objects photographed by these devices.

[0024] For example, such as Figure 1As shown, when a user previews / takes a picture of a person walking, the person displayed on the electronic device appears blurry. In this situation, the electronic device cannot obtain a clear image or video.

[0025] Generally, electronic devices can reduce motion blur by reducing exposure time. For example, Figure 2 This diagram illustrates the sampling of the pixel array when shooting with different exposure times (longer / shorter). It should be noted that "longer" and "shorter" exposure times refer to... Figure 2 The exposure times corresponding to the two sampled images do not specifically refer to any particular value or range. For example... Figure 2 As shown, the triangle represents the subject. The number of pixels sampled from the subject with a longer exposure time (the black-filled pixels in the image), for example, 4, is more than the number sampled with a shorter exposure time (for example, 2). That is, the shorter the exposure time, the smaller the displacement of the subject after imaging, resulting in weaker blurring. Therefore, reducing the exposure time can reduce blurring caused by subject movement, thus obtaining a sharper image.

[0026] In related technologies, when it is necessary to reduce motion blur, users can shorten the exposure time of electronic devices by enabling the snapshot function or manually setting the shutter speed. The snapshot function is primarily used for capturing moving objects. When the snapshot function is enabled, the shutter speed (i.e., exposure time) can be limited to a lower range, such as 1 / 500s to 1 / 1000s, to reduce motion blur.

[0027] Figure 3 This demonstrates the process of a user activating the snapshot function. For example... Figure 3As shown, the electronic device can display a camera application interface 110, which is a shooting preview interface. This preview interface displays the image currently captured by the camera in real time, such as image 111. Because the subject (i.e., a person) is walking, image 111 exhibits motion blur. Interface 110 also includes a capture control 112 and a capture icon 113, both indicating that the electronic device has not enabled the capture function. To obtain a clear image, the user can click the capture control 112 or the capture icon 113 to enable the capture function, thereby shortening the exposure time. For example, if the user clicks the capture icon 113, the electronic device can enable the capture function and display interface 120. Interface 120 includes image 121, which does not exhibit motion blur. Furthermore, the capture control 112 and the capture icon 113 in interface 120 both indicate that the electronic device has enabled the capture function.

[0028] Figure 4 This illustrates the process of a user manually setting the shutter speed. For example... Figure 4 As shown, interface 110 also includes options for multiple shooting modes, such as "Photo" and "Professional". Users can click the "Professional" option 114 to set shooting parameters. For example, in response to the user clicking the "Professional" option 114, the electronic device can display interface 130. Interface 130 may include image 131, which is an image captured by the camera based on the current shooting parameters. The current shooting parameters can be the shooting parameters when the electronic device last exited "Professional" shooting mode, or the preset default shooting parameters, or the shooting parameters recently used by the electronic device (i.e., the shooting parameters used by the electronic device to capture image 111). Figure 4 Taking the current shooting parameters as the shooting parameters when the electronic device last exited the "professional" shooting mode as an example, that is, the current shooting parameters are different from the shooting parameters used by the camera to capture image 111, so the motion blur of image 131 and image 111 are also different. In the case where the current shooting parameters are the shooting parameters most recently used by the electronic device, the above-mentioned image 131 can be replaced by image 111.

[0029] In addition, interface 130 includes options for multiple shooting parameters. These parameters include ISO (International Organization for Standardization), shutter speed, exposure value (EV), and white balance (WB). In interface 130, shutter speed is indicated by "S," and option 132 indicates the current shutter speed is 1 / 80. In response to the user clicking shutter speed option 132, the electronic device can display interface 140. Interface 140 is similar to interface 130, except that it includes an image 131, a shutter speed scale bar 141, and a shutter speed adjustment slider 142. The shutter speed scale bar 141 indicates the selectable range of shutter speed (exposure time), for example, 1 / 6400 to 0.6. The shutter speed adjustment slider 142 marks the current shutter speed (e.g., 1 / 80), and the shutter speed can be changed by sliding / clicking the slider 142. If the user wishes to shorten the exposure time, they can slide the shutter speed adjustment slider 142 to the left. In response to the user's action of sliding the shutter speed adjustment slider 142 to the left, the electronic device can display interface 150. The shutter speed adjustment slider 142 and option 132 in interface 150 indicate that the current shutter speed is 1 / 500. Furthermore, interface 150 also includes image 151, which was captured by the camera at a shutter speed of 1 / 500. Image 151 can be identical to image 121, and neither exhibits motion blur.

[0030] As can be seen, the two methods for shortening exposure time are rather cumbersome, and users cannot take pictures while performing these operations, making it easy to miss exciting moments and affecting the user's shooting experience.

[0031] Related technologies also offer another method for adjusting exposure time: electronic devices can perform motion detection on images captured by a camera and actively shorten the exposure time when the motion detection results indicate that the subject is moving. While this method eliminates the need for manual user settings, motion detection results are affected by factors such as the accuracy of various detection algorithms, ambient light, the size of the moving object, and the presence of flicker. In scenarios with low algorithm accuracy, low ambient light, small moving objects, or flickering, inaccurate motion detection results are easily encountered. Therefore, relying solely on motion detection results to determine whether to shorten the exposure time is unreliable.

[0032] Furthermore, even if electronic devices can obtain accurate motion detection results, the time required to obtain these results prevents them from adjusting the exposure time in a timely manner. This can also result in the inability to capture exciting footage, thus impacting the user's shooting experience.

[0033] To at least address the aforementioned problems, this application provides a shooting method applied to an electronic device including a camera. Upon receiving a trigger operation to shoot, the electronic device can acquire the frequency at which the user triggers the electronic device to shoot (denoted as the shutter trigger frequency). The method involves shooting with a first exposure time when the shutter trigger frequency is greater than or equal to a first preset frequency, and shooting with a second exposure time when the shutter trigger frequency is less than the first preset frequency, wherein the first exposure time is less than the second exposure time.

[0034] It should be understood that shutter trigger frequency can reflect a user's shooting intention. A higher shutter trigger frequency indicates that the user has recently and continuously and rapidly clicked the shutter button or triggered the shutter button in other ways, meaning the user wants the electronic device to take multiple images in succession, indicating an intention to capture moving scenes. With an increased shutter trigger frequency, the electronic device actively uses a shorter first exposure time, resulting in sharper images. Furthermore, adjusting the exposure time based on the shutter trigger frequency during the shooting process eliminates the need for manual adjustment by the user, simplifying operation and preventing missed moments due to manual exposure time adjustments, thus enhancing the user's shooting experience.

[0035] The electronic devices mentioned in this application may be mobile phones, tablets, laptops, handheld computers, notebook computers, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), augmented reality (AR) / virtual reality (VR) devices, cameras, camcorders, etc. The embodiments of this application do not impose special limitations on the specific form of the electronic devices.

[0036] The following example uses a mobile phone as an example to illustrate the hardware structure of an electronic device. Figure 5The diagram illustrates the hardware structure of an electronic device, which may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, antenna 1, antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, a headphone jack 270D, a sensor module 280, buttons 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a subscriber identification module (SIM) card interface 295, etc.

[0037] The aforementioned sensor module 280 may include sensors such as pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, and inertial measurement units (IMUs).

[0038] It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device 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.

[0039] Processor 210 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0040] A controller can be the nerve center and command center of an electronic device. Based on the instruction opcode and timing signals, the controller generates operation control signals to control the fetching and execution of instructions.

[0041] The processor 210 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. This memory can store instructions or data that the processor 210 has just used or that are used repeatedly. If the processor 210 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.

[0042] In some embodiments, the processor 210 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0043] The external storage interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 210 through the external storage interface 220 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0044] Internal memory 221 can be used to store computer executable program code, which includes instructions. Processor 210 executes various functional applications and data processing of the electronic device by running the instructions stored in internal memory 221. For example, in this embodiment, processor 210 can perform tasks such as taking pictures, detecting shutter trigger frequency, and adjusting exposure time by executing instructions stored in internal memory 221.

[0045] Internal memory 221 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as a camera function), etc. The data storage area may store data created during the use of the electronic device (such as image data, exposure time, ISO, etc.). Furthermore, internal memory 221 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.

[0046] It is understood that the interface connection relationships between the modules illustrated in this embodiment are merely illustrative and do not constitute a structural limitation on the electronic device. In other embodiments, the electronic device may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0047] Electronic devices implement display functions through a GPU, a display screen 294, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. The processor 210 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0048] The display screen 294 is used to display images, videos, and various interfaces related to this application. The display screen 294 includes a display panel. Optionally, the display screen 294 may also be a touchscreen.

[0049] The electronic device can implement shooting functions through an ISP, camera 293, video codec, GPU, display 294, and application processor. The ISP is used to process data fed back by the camera 293. The camera 293 is used to capture still images or videos. In some embodiments, the electronic device may include one or N cameras 293, where N is a positive integer greater than 1.

[0050] In this embodiment, the software system of the electronic device can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment uses the layered architecture of the Android™ system as an example to illustrate the software structure of the electronic device.

[0051] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through interfaces. In some embodiments, such as... Figure 6As shown, the Android™ system may include an application layer, an application framework layer, and a hardware abstraction layer (HAL). It should be noted that this application uses the Android™ system as an example; however, the solution of this application can also be implemented in other operating systems as long as the functions implemented by each functional module are similar to those in the embodiments of this application.

[0052] The application layer, also known as the application layer, can include a series of application packages. These application packages may include applications such as camera and settings. The camera application, in particular, provides shooting functionality. Furthermore, the camera application can receive actions that trigger the electronic device to take pictures (referred to as shutter trigger actions), count the shutter trigger frequency, and send the shutter trigger frequency to the camera service.

[0053] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes predefined functions. For example, it may include a camera service and a window manager service (WMS).

[0054] The camera service can receive the shutter trigger frequency sent by the camera application and the ambient light intensity collected by the ambient light sensor. Then, the camera service can adjust the exposure time based on the ambient light intensity and shutter trigger frequency, and provide the adjusted exposure time to the camera application and the camera HAL.

[0055] The window management service is used to manage window applications, including managing window hierarchy and display order. Additionally, the window management service can obtain the screen size, determine if a status bar is present, lock the screen, and capture the screen.

[0056] It should be noted that the application framework layer may also include functional modules not shown in the diagram, such as the view system API and the graphics system API. The view system API provides interfaces for building interfaces, layouts, and controls to upper-layer applications. The graphics system API provides interfaces for graphics drawing and display control to upper-layer applications.

[0057] HAL (Hardware Adapter) can be a wrapper around a hardware driver, providing interfaces to the upper layers and shielding them from the implementation details of the underlying hardware. When upper-layer software modules communicate with the hardware, they can implement the relevant functions of the hardware driver by calling the relevant interfaces in the HAL. For example, in this embodiment, the HAL may include a camera HAL.

[0058] The camera HAL can receive ambient light intensity data from an ambient light sensor and provide this information to the camera service. The camera HAL can also control the camera to take pictures using the adjusted exposure time after receiving it from the camera service.

[0059] Understandably, Figure 6 The hierarchical structure shown is only an example; an operating system may also include other software layers such as the kernel layer.

[0060] The shooting method provided in this application embodiment can be applied to electronic devices having the above-described hardware structure and software architecture.

[0061] Please see Figure 7 This is a flowchart illustrating a shooting method provided in an embodiment of this application. Figure 7 As shown, this shooting method includes at least S701 to S703.

[0062] S701, the electronic device receives shutter trigger operation 1.

[0063] In this embodiment, the electronic device can receive at least one shutter trigger operation, which includes shutter trigger operation 1. Furthermore, for each shutter trigger operation, the electronic device can record the timestamp corresponding to that operation for subsequent statistical analysis of the shutter trigger frequency.

[0064] S702, the electronic device counts the shutter trigger frequency within time period 1, time period 1 ends at time t1, and the duration of time period 1 is a preset duration, and time t1 is the time when the electronic device receives shutter trigger operation 1.

[0065] Taking a preset duration of Δt as an example, time period 1 can be a time period starting at time t1-Δt and ending at time t1. In other words, time period 1 changes with time t1, acting as a sliding time window. Optionally, the preset duration can be 0.5 seconds.

[0066] In the process of calculating the shutter trigger frequency within time period 1, the electronic device can first count the number of shutter trigger operations received within time period 1 (referred to as the shutter trigger count), and then calculate the shutter trigger frequency based on the shutter trigger count and the preset duration. Specifically, the shutter trigger frequency is the ratio of the shutter trigger count to the preset duration.

[0067] In this way, the shutter trigger frequency can accurately reflect the user's shooting intention within time period 1. A higher shutter trigger frequency indicates that the user has performed multiple consecutive shutter trigger operations, suggesting the user likely intended to photograph moving subjects. Conversely, a lower shutter trigger frequency indicates that the user did not perform consecutive shutter trigger operations, suggesting the user likely intended to photograph stationary subjects.

[0068] S703, when the shutter trigger frequency is greater than or equal to the first preset frequency, the electronic device takes a picture with an exposure time of 1; when the shutter trigger frequency is less than the first preset frequency, the electronic device takes a picture with an exposure time of 2, where the exposure time 1 is less than the exposure time 2, and the exposure time 2 is the exposure time when the electronic device receives the shutter trigger operation 1.

[0069] Specifically, the electronic device can generate and save an image matching exposure time 1 when taking a picture at exposure time 1. Similarly, the electronic device can generate and save an image matching exposure time 2 when taking a picture at exposure time 2. Optionally, exposure time 1 can also be referred to as the first exposure time, and exposure time 2 can also be referred to as the second exposure time; the shutter trigger frequency can be the first frequency.

[0070] In one implementation, exposure time 2 can be a user-preset exposure time. When the shutter trigger frequency is greater than or equal to a first preset frequency, the electronic device can randomly determine exposure time 1, ensuring that exposure time 1 is less than exposure time 2 and falls within the effective exposure time range. The effective exposure time range refers to the interval formed by the minimum and maximum exposure times supported by the electronic device, for example, 100µs to 1 second.

[0071] In another implementation, the exposure time 2 can be the base exposure time at time t1. The base exposure time at time t1 can be determined based on the ambient light intensity at time t1. The base exposure time is inversely proportional to the ambient light intensity; that is, the lower the ambient light intensity, the longer the base exposure time; and the higher the ambient light intensity, the shorter the base exposure time. Optionally, the electronic device can use an auto exposure (AE) algorithm to determine the base exposure time at time t1 based on the ambient light intensity at time t1.

[0072] The following explanation uses exposure time 2 as the base exposure time at time t1 as an example.

[0073] To achieve the effect of S703, the electronic device can determine the target exposure time after receiving shutter trigger operation 1, and then take a picture at the target exposure time. Specifically, when the shutter trigger frequency is greater than or equal to a first preset frequency, the target exposure time is exposure time 1; when the shutter trigger frequency is less than the first preset frequency, the target exposure time is exposure time 2.

[0074] The target exposure time can be determined based on the shutter trigger frequency and the base exposure time at time t1.

[0075] Specifically, the electronic device can determine a candidate exposure time based on the shutter trigger frequency and the base exposure time at time t1, and then determine whether the candidate exposure time is within the effective exposure time range. If the candidate exposure time is within the effective exposure time range, the electronic device can determine the target exposure time as the candidate exposure time; if the candidate exposure time is not within the effective exposure time range, the electronic device can determine the target exposure time as the preset exposure time.

[0076] In one implementation, the candidate exposure time and the base exposure time satisfy equation 1: S1 = S2·(1-A) equation 1; Where S1 is the candidate exposure time, S2 is the base exposure time, and A is the frequency weighting coefficient, and 0≤A<1.

[0077] It should be noted that Formula 1 is just an example. The candidate exposure time and the base exposure time can also be mapped through other formulas, as long as the candidate exposure time is less than the base exposure time. No specific restrictions are imposed here.

[0078] The aforementioned frequency weighting coefficient can be proportional to the shutter trigger frequency. In one implementation, the electronic device can determine the frequency weighting coefficient based on the frequency range in which the shutter trigger frequency falls. For example, the electronic device can divide the shutter trigger frequency into multiple frequency ranges arranged from low to high. The higher the frequency range in which the shutter trigger frequency falls, the larger the frequency weighting coefficient; the lower the frequency range in which the shutter trigger frequency falls, the smaller the frequency weighting coefficient.

[0079] For example, the electronic device divides the shutter trigger frequency into two frequency regions based on a first preset frequency. When the shutter trigger frequency is less than the first preset frequency, the electronic device can determine the frequency weighting coefficient as weighting coefficient A1. When the shutter trigger frequency is greater than or equal to the first preset frequency, the electronic device can determine the frequency weighting coefficient as weighting coefficient A2. Wherein, weighting coefficient A1 is less than weighting coefficient A2.

[0080] Thus, when the shutter trigger frequency is less than the first preset frequency, the electronic device can determine the candidate exposure time as S2·(1-A1). Taking S2·(1-A1) as an example within the effective exposure time range, the exposure time 2 is S2·(1-A1).

[0081] When the shutter trigger frequency is greater than or equal to the first preset frequency, the electronic device can determine the candidate exposure time as S2·(1-A2). Taking S2·(1-A2) as an example within the effective exposure time range, the exposure time 1 is S2·(1-A2). Since A1 < A2, S2·(1-A1) > S2·(1-A2), that is, the exposure time 2 is greater than the exposure time 1.

[0082] For example, the electronic device can divide the shutter trigger frequency into three frequency regions using a first preset frequency and a second preset frequency, where the first preset frequency is less than the second preset frequency. When the shutter trigger frequency is less than the first preset frequency, the electronic device can determine a frequency weighting coefficient as weighting coefficient A1. When the shutter trigger frequency is greater than or equal to the first preset frequency and less than the second preset frequency, the electronic device can determine a frequency weighting coefficient as weighting coefficient A2. When the shutter trigger frequency is greater than or equal to the second preset frequency, the electronic device can determine a frequency weighting coefficient as weighting coefficient A3. Wherein, weighting coefficient A1 is less than weighting coefficient A2, and weighting coefficient A2 is less than weighting coefficient A3.

[0083] In one implementation, the weight coefficient A1 can be 0, the weight coefficient A2 can be 0.3, the weight coefficient A3 can be 0.5, the first preset frequency can be 1 time / second, and the second preset frequency can be 3 times / second.

[0084] Thus, when the shutter trigger frequency is less than 1 time per second, the electronic device takes a picture using S2, the basic exposure time. When the shutter trigger frequency is greater than 1 time per second and less than or equal to 3 times per second, the electronic device takes a picture using 0.7·S2, or 0.7 times the basic exposure time. When the shutter trigger frequency is greater than 3 times per second, the electronic device takes a picture using 0.5·S2, or 0.5 times the basic exposure time. The basic exposure time, 0.7 times the basic exposure time, and 0.5 times the basic exposure time are all within the effective exposure time range.

[0085] It should be noted that the specific values ​​of the preset frequency and weight coefficients mentioned above are only examples, and users can set them according to their actual needs.

[0086] To achieve the effect of S703, the electronic device can also determine the basic exposure time at time t1 after receiving shutter trigger operation 1 and determine whether the shutter trigger frequency is greater than or equal to a first preset frequency. If the shutter trigger frequency is less than the first preset frequency, the electronic device takes a picture using the basic exposure time at time t1. If the shutter trigger frequency is greater than or equal to the first preset frequency, the electronic device can further calculate the target exposure time and take a picture using the target exposure time.

[0087] As can be seen, electronic devices can adjust the basic exposure time according to the ambient brightness and determine the target exposure time based on the basic exposure time. Thus, regardless of whether the shutter trigger frequency is greater than or equal to the first preset frequency or less than the first preset frequency, the exposure time used by the electronic device for shooting is matched with the current ambient brightness, which can improve the exposure accuracy of the photograph.

[0088] Furthermore, this application can identify the user's shooting intention based on the shutter trigger frequency. Specifically, when the shutter trigger frequency is greater than or equal to a first preset frequency, it indicates that the user likely wants to photograph a moving object; in this case, shooting with a shorter exposure time 1 can reduce motion blur. When the shutter trigger frequency is less than the first preset frequency, it indicates that the user likely wants to photograph a stationary object; in this case, shooting with a longer exposure time 2 can improve the image quality.

[0089] Furthermore, the electronic device automatically adjusts the exposure time based on the shutter trigger frequency, allowing the device to adjust the exposure time during the shooting process. This avoids users manually adjusting the exposure time and missing exciting moments, thus improving the user experience.

[0090] In one implementation, after the electronic device takes a picture with exposure time 1, it can determine whether a new shutter trigger operation (e.g., shutter trigger operation 2) has been received within a preset time period. If the electronic device receives shutter trigger operation 2 within the preset time period, it can then determine whether a new shutter trigger operation (e.g., shutter trigger operation 2) has been received. Figure 7 The process shown involves readjusting the exposure time. If the electronic device does not receive shutter trigger operation 2 within the preset time period, it can maintain the exposure time at exposure time 1 for that period. After the preset time period ends, the electronic device adjusts the exposure time according to the ambient light. In other words, the electronic device can acquire and preview the image at exposure time 1 until the preset time period ends or receives shutter trigger operation 2 within that period. Optionally, shutter trigger operation 2 can be referred to as the second operation, and the aforementioned preset time period can be referred to as the second time period.

[0091] In this way, within the preset time period, the electronic device can also capture a preview image with an exposure time of 1 and display the preview image in the shooting preview interface, thereby reducing motion blur in the preview image. When the user has not taken a picture for a long time, the electronic device captures a preview image with an exposure time that matches the ambient brightness value, so that the brightness of the preview image is adapted to the ambient light, making it easier for the user to improve the shooting quality.

[0092] In one implementation, after the electronic device takes a picture with an exposure time of 2, it can continue to determine a base exposure time based on the ambient light and acquire a preview image based on that base exposure time. This allows the brightness of the preview image to match the ambient light, making it easier for the user to improve the shooting quality.

[0093] In other words, when the shutter trigger frequency is greater than or equal to the first preset frequency, the electronic device can determine the exposure time 2 based on the shutter trigger frequency and the basic exposure time at time t1, and then take the picture and preview it using the exposure time 2. When the shutter trigger frequency is less than the first preset frequency, the electronic device can continuously determine the basic exposure time based on the ambient light intensity, and take the picture and preview it using the basic exposure time.

[0094] Understandably, image brightness is affected by the amount of native light entering the image and the sensor gain. Specifically, image brightness is directly proportional to the product of the amount of native light entering the image and the sensor gain. That is, the greater the product of the amount of native light entering the image and the sensor gain, the higher the image brightness, i.e., the brighter the image.

[0095] The amount of light entering the sensor is determined by the aperture and shutter speed (exposure time). With a fixed shutter speed, a larger aperture results in more light entering the sensor. Conversely, with a fixed aperture, a slower shutter speed results in more light entering the sensor. Sensor gain is determined by ISO; a higher ISO results in greater sensor gain.

[0096] In this embodiment, since the aperture of the electronic device is constant, adjusting the exposure time will inevitably cause a change in the image brightness. Therefore, in order not to change the image brightness, the electronic device can also adjust the ISO while adjusting the exposure time.

[0097] Taking the ISO before adjustment as the base ISO and the ISO after adjustment as the target ISO as an example, the base ISO and the target ISO can satisfy formula 2: TargetISO=BaseISO×(BaseExposure / AdjustedExposure) Calculation 2; Wherein, TargetISO is the target ISO, BaseISO is the baseline ISO, BaseExposure is exposure 1, and AdjustedExposure is exposure 2. Optionally, the target ISO can also be called the first ISO, and the baseline ISO can also be called the second ISO.

[0098] Understandably, exposure is used to measure the amount of native light entering the camera, and it is determined by aperture and shutter speed. In other words, adjusting the exposure time will cause a change in exposure. Exposure 1 above refers to the exposure before the electronic device adjusts the exposure time, and exposure 2 refers to the exposure after the electronic device adjusts the exposure time. Exposure 1 can also be called the exposure corresponding to exposure time 2, or the second exposure. Exposure 2 can also be called the exposure corresponding to exposure time 1, or the first exposure.

[0099] In other words, adjusting the exposure time of an electronic device changes the exposure from exposure 1 to exposure 2. Based on this, to ensure that the image brightness remains constant before and after the exposure time adjustment, the electronic device can adjust the ISO from a base ISO to a target ISO, where the ratio of the target ISO to the base ISO is the ratio of exposure 1 to exposure 2, i.e., BaseExposure / AdjustedExposure.

[0100] For example, the exposure range can be 0~255. Taking exposure 1 as 180 and exposure 2 as 150 as an example, the target ISO is 1.2 times the base ISO.

[0101] Thus, when the shutter trigger frequency is greater than or equal to the first preset frequency, the electronic device can also determine the target ISO 1 and take a picture with an exposure time of 1 and the target ISO 1. When the shutter trigger frequency is less than the first preset frequency, the electronic device can also determine the target ISO 2 and take a picture with an exposure time of 2 and the target ISO 2.

[0102] Understandably, the shooting method provided in this application has good results in capturing moving objects in low-light environments and in scenes where the subject frequently switches between stillness and movement.

[0103] The following example, capturing a moving object (such as a pet or a person in motion) in low light, will be used to illustrate the shooting method of this application.

[0104] In low-light conditions, such as indoors at night, a pet dog that was lying quietly might suddenly jump up to catch a frisbee, or a baby might suddenly make a quick and amusing movement. Users instinctively tap the shutter button rapidly to capture this moment.

[0105] In related technologies, due to the low brightness of indoor environments, camera applications automatically allocate longer exposure times (such as 1 / 30 second) and lower ISOs to reduce image noise and ensure image clarity. When a user rapidly clicks the shutter button repeatedly, the electronic device will produce a series of unusable photos with severe motion blur and unclear images.

[0106] In this solution, considering that users are often eager to capture the moment and tend to click the shutter quickly, the electronic device shortens the exposure time from the base exposure time when the click frequency is greater than or equal to a first preset frequency, thus reducing motion blur. Simultaneously, to compensate for the darkening of the image caused by the shortened exposure time, the electronic device can increase the ISO gain.

[0107] In this way, users can obtain a set of snapshots with a clear subject, no motion blur, and appropriate brightness without adjusting the exposure time, which can improve the user's shooting experience.

[0108] Let's take another example: a scene where the subject frequently switches between stillness and motion. In a scene where a user is watching a street skateboarding performance, the skateboarder first stands still and prepares (stillness), then suddenly accelerates and sprints to complete a high-flying flip (motion).

[0109] In related technologies, electronic devices can perform motion detection based on image frames captured by a camera, but they cannot predict whether motion is actually occurring. Therefore, when the skateboarder is stationary, the electronic device automatically adjusts the exposure time based on the ambient brightness. However, once the skateboarder jumps, even if the user presses the shutter quickly and continuously, the first few photos taken by the electronic device at the moment of takeoff are still blurry due to the insufficient real-time performance of the motion detection algorithm.

[0110] In this embodiment, when the skateboarder is stationary, the user occasionally presses the shutter button, causing the shutter trigger frequency to be lower than the first preset frequency. This allows the electronic device to capture the image at the base exposure time, resulting in a detailed image. When the skateboarder is moving, the user presses the shutter button quickly and continuously, causing the shutter trigger frequency to be higher than the first preset frequency. The electronic device then directly captures the image at a first exposure time shorter than the base exposure time, without waiting for algorithm detection results, resulting in a smoother and faster exposure time switching.

[0111] The following section will introduce the shooting methods provided in this application, using the relevant interface of the camera application.

[0112] Taking the electronic device display interface 110 as an example, interface 110 also includes a shutter button 115. For example... Figure 8As shown, the electronic device can receive the user's operation 1 of clicking the shutter button 115. In response to this operation 1, the electronic device can obtain the shutter trigger frequency, for example, frequency 1. When frequency 1 is greater than or equal to a first preset frequency, on the one hand, the electronic device can use exposure time 1 to take a picture and obtain image 1. On the other hand, the electronic device can also use exposure time 1 to acquire a preview image and display it on interface 310. Interface 310 includes image 311, which is a preview image acquired by the electronic device using exposure time 1. Image 311 does not have any motion blur.

[0113] When frequency 1 is less than a first preset frequency, on the one hand, the electronic device can use exposure time 2 (i.e., the base exposure time at time t1) to capture image 2. On the other hand, the electronic device can determine the base exposure time in real time according to the ambient light intensity, and acquire and display a preview image based on the base exposure time (e.g., exposure time 3). For example, the electronic device can display interface 320, which includes image 321, which is a preview image acquired by the electronic device using exposure time 3.

[0114] It should be noted that the operation of clicking the shutter button 115 described above can be understood as an example of a shutter trigger operation (i.e., triggering the electronic device to take a picture). In practical applications, the shutter trigger operation can also be other types, such as the electronic device including a shutter button 116, and the shutter trigger operation including the user pressing the shutter button 116. For example, the shutter trigger operation can also include the user's voice control of the electronic device to take a picture, etc.

[0115] also, Figure 8 The example described uses only the "Photo" shooting mode. In this embodiment, in all shooting modes used to capture still images, the user can adjust the exposure time by controlling the frequency of shutter triggering. Shooting modes for capturing still images may include "Photo" mode, "Portrait" mode, "Night Scene" mode, and "Pro" mode, etc.

[0116] In one implementation, the electronic device can simultaneously adjust the exposure time and activate the snapshot function. For example, in response to a frequency 1 being greater than or equal to a first preset frequency, the electronic device can activate the snapshot mode and display the image. Figure 9 The interface 330 is shown. Interface 330 includes image 331, which is identical to image 311 and shows no ghosting. Furthermore, the snapshot control 112 and snapshot icon 113 in interface 330 both indicate that the electronic device has activated its snapshot function.

[0117] Next, let's combine... Figure 6 The software system shown illustrates the shooting method provided in this application.

[0118] like Figure 10 The diagram illustrates the interaction between the various software modules within the aforementioned software framework. The camera application can count the shutter trigger frequency within a sliding time window and send this frequency to the camera service. The camera service can determine the target exposure time and target ISO based on the shutter trigger frequency and the ambient light intensity provided by the camera's HAL, and send the target exposure time and target ISO to both the camera HAL and the camera application. Upon receiving the target exposure time and target ISO, the camera HAL can control the camera to take a picture at the target exposure time and target ISO. The camera application can record the target exposure time and target ISO.

[0119] Please see Figure 11 This is a timing diagram related to a shooting method provided in an embodiment of this application. Figure 11 As shown, the shooting method includes: S1101, at time t1, the camera application receives the user's shutter trigger operation.

[0120] S1102, Camera application statistics of shutter trigger frequency within a sliding time window.

[0121] S1103, the camera application sends the shutter trigger frequency to the camera service.

[0122] S1104, the camera service obtains the ambient light intensity at time t1.

[0123] After receiving the shutter trigger operation, the camera service can send a request to the camera HAL to obtain the ambient light brightness, and the camera HAL will provide the camera service with the ambient light brightness at time t1.

[0124] S1105, the camera service determines the base exposure time at time t1 based on the ambient light intensity at time t1.

[0125] S1106, the camera service determines the candidate exposure time based on the shutter trigger frequency and the base exposure time at time t1.

[0126] The process of determining the candidate exposure time can be found in Formula 1 and related content above, and will not be repeated here.

[0127] S1107, Camera service determines whether candidate exposure times are valid.

[0128] If the candidate exposure time is valid, then execute S1108; if the candidate exposure time is invalid, then execute S1109.

[0129] The process of determining whether a candidate exposure time is legal can be found in the previous text and will not be repeated here.

[0130] S1108, the camera service determines the target exposure time as a candidate exposure time.

[0131] S1109, the camera service sends a request to the camera HAL to obtain the exposure time.

[0132] S1110, the camera HAL sends the preset exposure time to the camera service.

[0133] S1111, the camera service determines the base exposure time as the preset exposure time.

[0134] S1112, Camera service determines target ISO.

[0135] The electronic device can determine the target ISO based on the target exposure time, and the process of determining the target ISO is described in Formula 2 and related content above, which will not be repeated here.

[0136] S1113, the camera service sends the target exposure time and target ISO to the camera HAL.

[0137] S1114, the camera HAL controls the camera to take pictures with the target exposure time and target ISO.

[0138] It should be noted that, Figure 11 The signaling interaction diagram shown is only an example; this application can also be implemented in other ways. Figure 7 The method is illustrated. For example, before S1106, it can be determined whether the shutter trigger frequency is less than a first preset frequency. If the shutter trigger frequency is less than the first preset frequency, the camera service determines the target exposure time as the base exposure time, and there is no need to determine a candidate exposure time. If the shutter trigger frequency is greater than or equal to the first preset frequency, S1106 is executed.

[0139] This application also provides a chip system including at least one processor and at least one interface circuit. The processor and the interface circuit are interconnected via lines. For example, the interface circuit can be used to receive signals from other devices (e.g., the memory of an electronic device). As another example, the interface circuit can be used to send signals to other devices (e.g., the processor). Exemplarily, the interface circuit can read instructions stored in memory and send those instructions to the processor. When the instructions are executed by the processor, the electronic device or server can perform the steps in the above embodiments. Of course, the chip system may also include other discrete devices, and this application does not specifically limit this.

[0140] This embodiment also provides a computer-readable storage medium storing computer instructions that, when executed on an electronic device, cause the electronic device or server to perform the various functions or steps described in the above method embodiments.

[0141] This embodiment also provides a computer program product that, when run on an electronic device, causes the electronic device to perform the various functions or steps described in the above method embodiments.

[0142] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component or module. The apparatus may include a connected processor and a memory. The memory is used to store computer execution instructions. When the apparatus is running, the processor can execute the computer execution instructions stored in the memory to cause the chip to perform the various functions or steps performed by the mobile phone in the above method embodiments.

[0143] In this embodiment, the electronic device, computer-readable storage medium, computer program product or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0144] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0145] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0146] The unit described as a separate component may or may not be physically separate. The component shown as a unit can be one physical unit or multiple physical units, that is, it can be located in one place or distributed in multiple different places. Some or all of the units can be selected to achieve the purpose of the solution in this embodiment according to actual needs.

[0147] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0148] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0149] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application.

Claims

1. A shooting method, characterized in that, Applied to electronic devices, the method includes: The shooting preview interface is used to display image frames captured by the electronic device in real time. At the first moment, a first operation is received, which is used to trigger the electronic device to take a picture; In response to the first operation, if the first frequency is greater than or equal to the first preset frequency, a first exposure time is taken, the first exposure time is less than the second exposure time, the second exposure time is the exposure time of the electronic device at the first moment, the first frequency is the frequency at which the electronic device receives the first operation within a first time period, the first time period ends at the first moment, the duration of the first time period is a preset duration, the first exposure time is a candidate exposure time, the candidate exposure time is determined according to the first frequency and the second exposure time, the candidate exposure time is inversely proportional to the first frequency, and the candidate exposure time is within the effective exposure time range.

2. The method according to claim 1, characterized in that, When the first frequency is less than the first preset frequency, the second exposure time is used for shooting.

3. The method according to claim 2, characterized in that, The second exposure time is the base exposure time of the first moment, and the base exposure time of the first moment is determined according to the ambient light intensity of the first moment.

4. The method according to claim 3, characterized in that, The method further includes: A frequency weighting coefficient is determined based on the first frequency, and the frequency weighting coefficient is proportional to the first frequency. The product of the second exposure time and the first difference is taken as the candidate exposure time, where the first difference is the difference between 1 and the frequency weighting coefficient.

5. The method according to any one of claims 1-4, characterized in that, The method further includes: When the first frequency is greater than or equal to the first preset frequency, a first ISO is determined; wherein, the ratio between the first ISO and the second ISO is equal to the ratio between the second exposure and the first exposure, the second ISO is the ISO corresponding to the second exposure time, the first exposure is the exposure corresponding to the first exposure time, and the second exposure is the exposure corresponding to the second exposure time. The shooting at the first exposure time includes: Take a picture at the first exposure time and the first ISO.

6. The method according to any one of claims 1-4, characterized in that, When the first frequency is greater than or equal to the first preset frequency, the method further includes: The first preview image is acquired and displayed at the first exposure time until the second time period ends or the second operation is received within the preset time period.

7. An electronic device, characterized in that, The electronic device includes: a memory, one or more processors, and a camera; the memory and the camera are coupled to the processor. The memory is used to store computer program code, which includes computer instructions; when the computer instructions are executed by the processor, the electronic device performs the method as described in any one of claims 1-6.

8. A computer-readable storage medium, characterized in that, Includes computer instructions; When the computer instructions are executed on the electronic device, the electronic device causes the electronic device to perform the method as described in any one of claims 1-6.

9. A computer program product, characterized in that, When the computer program product is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Shooting parameter adjusting method and device

    CN105306824A

  • Image capturing apparatus capable of obtaining high-quality image, method of controlling same, and storage medium

    US20230144310A1