Image processing method, electronic device and readable storage medium
By determining the first image frame and exposure sequence from the cached multi-frame image frames in the HDR mode of the electronic device, the problem of poor HDR imaging caused by jitter and object movement is solved, and high quality in unstable scenes is achieved. Image generation.
Patent Information
- Application Number
- CN202310970674.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-02
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2043-08-02
AI Technical Summary
When the electronic device is shaking or there are people and objects moving in the shooting scene, the high dynamic range imaging (HDR) effect is poor, resulting in loss of image details and noise.
By determining the first image frame from multiple original image frames cached during the preview process when the shooting instruction is detected in the HDR mode, determining the first exposure sequence based on the first image frame, and sequentially acquiring multiple second image frames, Ensure that the exposure difference between the second image frame and the first image frame is small, thereby generating a high-quality HDR image.
It improves the HDR imaging effect in unstable scenes, avoids image frame discarding caused by excessive exposure differences, ensures image detail retention and quality improvement, and improves shooting stability.
Smart Images

Figure CN117714835B
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image processing method, an electronic device and a readable storage medium. Background Art
[0002] Currently, users have higher and higher requirements for the photo-taking effect of electronic devices, and various technologies for improving image quality have emerged, such as high dynamic range (HDR). High dynamic range imaging usually uses different exposures to obtain multiple images of the same scene, and then combines these images with different exposures into an HDR image. For example, when shooting a scene, the difference in brightness between the scene and the environment is large, and the image taken is likely to be too bright or too dark, resulting in unclear details. HDR shooting can obtain images with more details.
[0003] However, when synthesizing HDR images based on existing methods, the HDR imaging effect is poor when the electronic device is shaken or there are people and objects moving in the shooting scene and other unstable conditions. Summary of the invention
[0004] The present application provides an image processing method, an electronic device and a readable storage medium, which can improve the HDR imaging effect when the electronic device is shaken or there are people and objects moving in the shooting scene. The technical solution is as follows:
[0005] In a first aspect, an embodiment of the present application provides an image processing method, which is applied to an electronic device, and the method includes: when a high dynamic range HDR mode of a shooting function of the electronic device has been turned on, the electronic device detects a shooting instruction requesting the electronic device to shoot, and in response to the shooting instruction, the electronic device determines a first image frame from multiple frames of original image frames cached during a preview process; determines a first exposure sequence according to the first image frame, the electronic device sequentially obtains multiple frames of second image frames according to the first exposure sequence, and generates a high dynamic range image according to the multiple frames of second image frames and the first image frame. Wherein, the first exposure sequence includes multiple groups of exposure parameters, at least two groups of exposure parameters in the multiple groups of exposure parameters have different values, and the second image frame corresponds to the multiple groups of exposure parameters.
[0006] Based on the above technical solution, when an HDR image is generated according to a first image frame and multiple second image frames, since the multiple second image frames are generated according to a first exposure sequence, the exposure parameters in the first exposure sequence are used to determine the exposure amount of the second image frame, and the first exposure sequence is determined according to the first image frame, that is, the same image frame (that is, the first image frame) is used when determining the first exposure sequence and when generating an HDR image in combination with the multiple second image frames. Therefore, the difference between the exposure amount of the multiple second image frames and the exposure amount of the first image frame is small.
[0007] Compared with the situation where different image frames are used when determining the first exposure sequence and when generating an HDR image in combination with multiple second image frames, for example, the first image frame is used when calculating the first exposure sequence, and multiple second image frames and other image frames are used when generating the HDR image, the difference in exposure between the first image frame and the other image frames may be large under unstable conditions. The present application uses the first image frame and is therefore not affected by unstable conditions. This can avoid the problem of discarding some image frames in the multiple second image frames due to the large difference in exposure between the multiple second image frames and other image frames in the subsequent process of generating HDR images, that is, not using all the second image frames to generate the HDR image, resulting in poor HDR imaging effect. Moreover, the method provided in the embodiment of the present application can present better HDR imaging effects under various unstable conditions and improve shooting stability.
[0008] Among them, multiple frames of original image frames obtained during the preview process can be cached in a queue in time sequence. The queue can cache a preset number of image frames, for example, up to 8 image frames can be stored simultaneously. The shooting data of each frame of the original image can also be stored during caching, and the shooting data may include angular velocity, timestamp, exposure parameters, etc. The exposure parameters may include exposure time, sensitivity, aperture factor, etc. Among them, the timestamp refers to the moment when the original image frame is obtained.
[0009] The electronic device may determine the first exposure sequence according to the shooting data of the first image frame. It should be understood that the first exposure sequence includes multiple groups of exposure parameters, and the parameters in one group of exposure parameters may include exposure time, sensitivity, aperture factor, etc., and at least two groups of exposure parameters in the multiple groups of exposure parameters have different values, for example, different exposure time values, different sensitivity values, or different values of each parameter.
[0010] In combination with the first aspect and the implementation method, the first image frame is a medium exposure image frame, and the first exposure sequence includes at least two corresponding exposure parameters of a long exposure image frame, a medium exposure image frame, and a short exposure image frame, wherein the exposure time of the long exposure image frame is greater than the exposure time of the medium exposure image frame, and the exposure time of the medium exposure image frame is greater than the exposure time of the short exposure image frame. In other words, the multiple second image frames include at least two of the long exposure image frame, the medium exposure image frame, and the short exposure image frame, and the multiple second image frames need to be output in sequence according to the determined frame output order.
[0011] It should be understood that for different shooting scenes, such as daytime and night scenes, the long and short frames, the frame output order, and the exposure parameters in the first exposure sequence may be different. For example, in a certain shooting scene, the multiple second image frames that need to be output are, in sequence, one long exposure image frame, one medium exposure image frame, and one short exposure image frame. In another shooting scene, the multiple second image frames that need to be output are, in sequence, one short exposure image frame, one medium exposure image frame, two short exposure image frames, and one long exposure image frame.
[0012] In combination with the above-mentioned first aspect, in some implementations, the electronic device may determine a second exposure sequence based on a third image frame from multiple frames of original image frames cached during a preview process; determine a first image frame from multiple frames of original image frames based on the second exposure sequence and shooting data corresponding to the multiple frames of original image frames, and the timestamp corresponding to the first image frame is earlier than the timestamp corresponding to the third image frame.
[0013] In combination with the above-mentioned first aspect and the above-mentioned implementation manner, in some implementation manners, the third image frame may be the last frame of the multiple frames of original image frames corresponding to when the shooting instruction is detected.
[0014] In combination with the above-mentioned first aspect, in some implementations, the electronic device may determine the first image frame from multiple original image frames according to the moment when the shooting instruction is detected.
[0015] In the above implementation, the first image frame selected is the original image frame output closer to the time when the user issues a shooting command as the first image frame, which is used to generate an HDR image, can achieve a what you see is what you get effect and improve the user experience.
[0016] In combination with the above first aspect and the above implementation manner, in some implementation manners, the exposure parameter includes at least one of exposure time and sensitivity.
[0017] In combination with the above-mentioned first aspect and the above-mentioned implementation manner, in some implementation manners, the shooting instruction may be a click operation of the user on the shooting control, or may be a voice instruction, or a gesture instruction, etc.
[0018] When the shooting instruction is a user clicking operation on a shooting control, the action of "clicking the shooting control" can be subdivided into two stages: pressing and lifting. In one implementation, when it is detected that the user presses the shooting control of the shooting function in the electronic device, the shooting instruction can be issued, and the subsequent process can be carried out. During the pressing and lifting process of the action of "clicking the shooting control", the frame selection, exposure sequence calculation, and second image frame output are performed. In the lifting stage, the image sensor may have already output the second image frame, so that the waiting processing time can be reduced and the shooting response speed can be improved.
[0019] In a second aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; one or more memories; the memory stores one or more programs, and when one or more programs are executed by the processor, the electronic device executes any possible method of the first aspect above.
[0020] In a third aspect, an embodiment of the present application provides a device, which is included in an electronic device, and the device has the function of realizing the above-mentioned aspects and the behavior of the electronic device in the possible implementation methods of the above-mentioned aspects. The function can be implemented by hardware, or the corresponding software can be implemented by hardware. The hardware or software includes one or more modules or units corresponding to the above-mentioned functions. For example, a display module or unit, a detection module or unit, a processing module or unit, etc.
[0021] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer executes the method described in the first aspect above.
[0022] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method described in the first aspect above.
[0023] The technical effects obtained by the above-mentioned second, third, fourth and fifth aspects are similar to the technical effects obtained by the corresponding technical means in the above-mentioned first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present application is shown;
[0025] Figure 2 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown;
[0026] Figure 3 An example of a software structure block diagram provided in an embodiment of the present application is shown;
[0027] Figure 4 A schematic diagram of a flow chart based on a software structure provided in an embodiment of the present application is shown;
[0028] Figure 5 A schematic diagram of a flow chart of an image processing method provided in an embodiment of the present application is shown;
[0029] Figure 6 A schematic diagram of the structure of a cache queue provided in an embodiment of the present application is shown;
[0030] Figure 7A schematic diagram showing a flow chart of another image processing method provided in an embodiment of the present application is shown;
[0031] Figure 8 A schematic diagram of a device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical scheme and advantages of the present application clearer, the implementation mode of the present application will be further described in detail below with reference to the accompanying drawings. Hereinafter, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present embodiment, unless otherwise specified, the meaning of "multiple" is two or more.
[0033] First, some terms in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.
[0034] 1. Exposure Value (EV)
[0035] Exposure refers to the intensity and duration of light perceived by the camera. When shooting with a camera, due to the limitation of dynamic range, the exposure may be too high or too low, which will directly cause the subject and background to be overexposed or underexposed. If overexposed, the image will be too bright and the details of the highlights will not be reflected; if underexposed, the image will be too dark and the details of the shadows will not be reflected.
[0036] Exposure parameters include aperture, exposure time and sensitivity. Among them, the exposure time can be adjusted by controlling the shutter speed. The faster the shutter speed, the shorter the exposure time and the less exposure; on the contrary, the slower the shutter speed, the longer the exposure time, the more exposure and the higher the image brightness.
[0037] The larger the aperture (the smaller the value), such as F2.8, the more exposure there is and the brighter the image is. The smaller the aperture (the larger the value), such as F16, the less exposure there is and the brighter the image is.
[0038] Among them, sensitivity is used to measure the sensitivity of photosensitive components to light. Specifically, the higher the sensitivity, the stronger the ability to analyze light, the more light is sensed, and the image brightness increases; on the contrary, the lower the sensitivity, the weaker the ability to analyze light, the less light is sensed, and the image brightness decreases. Sensitivity is often expressed by ISO sensitivity value, which can be divided into several gears, such as 50, 100, 200, 400, 800, 1600, 3200, ... The higher the ISO sensitivity value, the stronger the sensitivity of the photosensitive component.
[0039] In actual application, the exposure amount during shooting can be controlled by controlling parameters such as aperture, exposure time and sensitivity, thereby controlling the shooting effect. By reasonably adjusting the exposure parameters, the generated image can be made more vivid in color, higher in contrast and with clearer image details.
[0040] 2. Long frame images, medium frame images and short frame images
[0041] In the embodiments of the present application, for the convenience of description, image frames with long exposure times are referred to as long-frame images or long-exposure image frames, denoted as L frames. Image frames with short exposure times are referred to as short-frame images or short-exposure image frames, denoted as S frames. Image frames with exposure times between long-frame images and short-frame images are referred to as medium-frame images or medium-exposure image frames, denoted as N frames. The exposure time of a long-frame image is greater than that of a medium-frame image, and the exposure time of a medium-frame image is greater than that of a short-frame image. It should be noted that the length of the exposure time here is relative, and the specific exposure time value can be determined according to actual usage requirements, and is not limited in the embodiments of the present application.
[0042] 3. High-Dynamic Range (HDR)
[0043] High dynamic range is a technology that synthesizes images with high dynamic range by continuously generating multiple frames with different exposures. Compared with ordinary images, the bright parts of high dynamic range images are not overexposed, and the details in the dark parts are clearly visible, which can provide more dynamic range and image details.
[0044] The above is a brief introduction to the terms involved in the embodiments of the present application, which will not be repeated below.
[0045] The shooting function of the electronic device may provide an HDR mode or function. Figure 1 FIG. 1 is a schematic diagram showing an interface for enabling HDR mode in a camera application in an embodiment of the present application. Figure 1 As shown in (a), a camera application is installed on the electronic device. Exemplarily, in response to a user clicking on the camera application, the electronic device runs the camera application and displays the following Figure 1The shooting interface shown in (b) of FIG. The shooting interface includes multiple options for providing users with different shooting modes, such as large aperture mode, night scene mode, portrait mode, photo mode, video mode, professional mode, and more.
[0046] Clicking the "More" option will display Figure 1 The corresponding menu bar shown in (c) in the figure has an HDR control 11 displayed in the menu bar. In response to the user's triggering operation on the HDR control 11, the electronic device enables the HDR mode. Figure 1 As shown in (d), after the electronic device enables the HDR mode, an HDR logo 12 is displayed in the shooting interface, prompting the user that the current camera has turned on the HDR mode. The shooting interface also includes a shooting button 20 and a preview window 30, and the preview window can display a preview image. In the HDR mode, in response to the user's triggering operation of the shooting button 20 (an example of a shooting instruction), the camera can send a shooting instruction to the image sensor, and then the image sensor outputs image frames with different exposure amounts, and the electronic device generates an HDR image based on the image frames with different exposure amounts.
[0047] During the preview process, the electronic device can cache the original image frames output by the image sensor in a cache queue, and the cache queue can cache multiple frames of original image frames. From the time the application receives the user's shooting instruction to the time the processing module of the electronic device receives the shooting instruction, the image frames output by the sensor can be cached in the cache queue.
[0048] In one implementation, in response to a user's shooting instruction, the electronic device may cache the last frame of image in the queue when the shooting instruction is received (recorded as the original image frame z, such as Figure 6 The 7th frame image shown in FIG. 1 is used to determine the exposure sequence according to the original image frame z; and an image frame with better image quality is selected from the cache queue (recorded as the original image frame y, as shown in FIG. 1 ). Figure 6 The camera application sends the exposure sequence to the image sensor, and the image sensor outputs multiple original image frames m according to the exposure sequence. The electronic device generates an HDR image according to the original image frame y and the multiple original image frames m.
[0049] In the above implementation, different image frames are used when determining the exposure sequence and when combining multiple second image frames to generate an HDR image. Since the original image frame z is used when calculating the exposure sequence of the original image frame m, the difference between the exposure of the multiple original image frames m and the exposure of the original image frame z is small, while the original image frame z and the original image frame y may not be one frame. In a motion scene or a scene where the electronic device shakes or sways greatly, or in an unstable scene such as an object or a person moving, the difference between the exposure of the original image frame z and the original image frame y may be too large. Therefore, the difference between the exposure of the multiple original image frames m and the exposure of the original image frame y may be too large. For example, the difference between the exposure of the middle frame image in the multiple original image frames m and the exposure of the original image frame y is too large. However, if the exposure difference is too large and does not meet the subsequent verification requirements, the original image frame m whose exposure difference with the original image frame y is too large will be discarded, which will result in part of the original image frame m being used when the HDR image is subsequently generated, that is, not all second image frames are used to generate the HDR image, resulting in the inability to completely merge multiple frames of the original image frame m and the original image frame y, resulting in poor HDR imaging effects, for example, loss of HDR effect, overexposure of the image, noisy image, etc.
[0050] In view of this, an embodiment of the present application provides an image processing method. In HDR mode, in response to a shooting instruction, the electronic device can select a first image frame from a cache queue, determine a first exposure sequence based on the first image frame, and send the first exposure sequence to the image sensor. The image sensor sequentially outputs multiple frames of second image frames according to the first exposure sequence, and then the electronic device generates an HDR image based on the first image frame and the second image frame.
[0051] According to the method of the embodiment of the present application, when an HDR image is generated according to the first image frame and the multiple second image frames in an unstable scene, since the multiple second image frames are generated according to the first exposure sequence, and the first exposure sequence is determined according to the first image frame, the difference between the exposure of the multiple second image frames and the exposure of the first image frame is small, that is, the same image frame (that is, the first image frame) is used when determining the first exposure sequence and when combining the multiple second image frames to generate the HDR image, and is not affected by the unstable situation. Compared with the situation where different image frames are used when determining the first exposure sequence and when combining the multiple second image frames to generate the HDR image, it can avoid the problem that due to the large difference in exposure between the multiple second image frames and other image frames, some image frames in the multiple second image frames are discarded, that is, not all the second image frames are used to generate the HDR image, resulting in poor HDR imaging effect, and the multiple second image frames and the first image frame can be better integrated, so that the HDR imaging effect is better. Moreover, the method provided by the embodiment of the present application can make the HDR imaging effect better in various unstable scenes and improve the shooting stability.
[0052] The image processing method provided in the embodiment of the present application can be applied to various electronic devices with shooting functions and providing HDR mode in the shooting function. The shooting function can take photos or videos. The electronic device can be but not limited to a mobile phone, a tablet computer, a desktop, a laptop, a handheld computer, a notebook computer, a vehicle-mounted device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, a cellular phone, a personal digital assistant (personal digital assistant, PDA), an augmented reality (augmented reality, AR)\virtual reality (virtual reality, VR) device, etc., and the embodiment of the present application does not limit this.
[0053] The following will describe in detail the implementation methods provided by the embodiments of the present application in conjunction with the accompanying drawings. Figure 2 A hardware structure diagram of an electronic device 100 provided in an embodiment of the present application is shown.
[0054] The electronic device 100 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, an earphone interface 170D, a sensor module 180, a button 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, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0055] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0056] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0057] Among them, the controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and execution.
[0058] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0059] In some embodiments, the processor 110 may include one or more interfaces. The interface 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.
[0060] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0061] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
[0062] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0063] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
[0064] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0065] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0066] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0067] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0068] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.
[0069] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0070] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0071] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0072] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0073] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0074] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0075] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0076] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0077] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0078] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0079] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0080] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0081] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0082] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0083] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0084] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0085] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor.
[0086] The electronic device 100 can implement audio functions such as music playing, recording, voice calls, video calls, etc. through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0087] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0088] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0089] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0090] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.
[0091] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0092] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0093] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
[0094] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
[0095] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover can be automatically unlocked.
[0096] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0097] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
[0098] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.
[0099] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
[0100] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0101] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of a processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
[0102] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0103] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.
[0104] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
[0105] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0106] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0107] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0108] In the following embodiments, the method of the embodiment of the present application is introduced by taking the electronic device 100 as a mobile phone as an example. The software structure of the electronic device 100 is exemplified by taking the Android system of layered architecture as an example. Figure 3 A software structure block diagram of the electronic device 100 provided in an embodiment of the present application is shown.
[0109] The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into the application layer, the application framework layer (Application Framework), the hardware abstraction layer (HAL), the kernel layer and the hardware layer from top to bottom. It should be understood that the embodiment of the present application takes the Android system as an example, and the operator system of the electronic device may include but is not limited to (Symbian), (Android), (iOS), The present application does not make any limitation to operating systems such as Blackberry and HarmonyOS. As long as the functions implemented by each functional module are similar to those implemented in the embodiments of the present application, the solutions of the present application can also be implemented.
[0110] Applications with shooting functions can be installed in the application layer, for example, a camera application, which provides an HDR mode. Of course, when other applications need to use the shooting function, they can also call the camera application to implement the shooting function.
[0111] Other applications in the application layer include but are not limited to music, gallery, calendar, short message, call, navigation, video and other applications.
[0112] The application framework layer may provide an application programming interface (API) and a programming framework to the application programs of the application layer; the application framework layer may include some predefined functions.
[0113] For example, the application framework layer may include a camera access interface; the camera access interface may include camera management and camera equipment; wherein, camera management may be used to provide an access interface for managing the camera; and camera equipment may be used to provide an interface for accessing the camera.
[0114] The application framework layer may also include a window manager, a content provider, a view system, a resource manager, a notification manager, etc. (not shown in the figure), and the embodiments of the present application do not impose any restrictions on this.
[0115] The hardware abstraction layer is used to abstract the hardware. By calling the hardware abstraction layer interface in the hardware abstraction layer, the application layer and application framework layer above the hardware abstraction layer can be connected with the driver layer and hardware layer below, realizing the transmission of shooting data and function control.
[0116] In the embodiment of the present application, the hardware abstraction layer may include a first hardware abstraction layer and a second hardware abstraction layer, the first hardware abstraction layer includes an image management module chi and an image processing module camx, and the second hardware abstraction layer includes a perception engine, etc. Among them, the image management module is used for customized process management, and manufacturers can customize functions here according to requirements. The image processing module is used to interact with the underlying driver, and according to the shooting instructions issued by the image management module, it issues image instructions to the sensor driver. The image processing module is also used to receive the original image output by the sensor and perform image processing on the original image.
[0117] The perception engine encapsulates the smartAE encapsulation module, which can calculate the exposure sequence using different photography methods (such as photography methods 1 to 4) in different shooting scenes, including daytime, nighttime, landscape, portrait, etc. For example, photography method 1 is used to calculate the exposure sequence required to generate an HDR image during the daytime. The perception engine also includes a cache queue, and each original image frame output by the image sensor can be cached in the cache queue, such as multiple frames of original image frames output by the image sensor during the cache preview process, and the shooting data of each original image frame, the shooting data includes but is not limited to autofocus (AF) statistics, automatic exposure (AE) statistics, automatic white balance (AWB) statistics, angular velocity, timestamp, contrast, etc., and AE statistics include but are not limited to exposure time, pixel brightness, ISO sensitivity value, etc. Among them, the timestamp refers to the moment when the original image frame is obtained.
[0118] The kernel layer is used to provide drivers for different hardware devices. For example, the driver layer may include camera drivers, display drivers, and sensor drivers.
[0119] The hardware layer may include multiple image sensors, multiple image signal processors, cameras, displays, and other hardware devices.
[0120] Combine the following Figure 3 and Figure 4 The workflow of the software and hardware of the electronic device 100 is exemplified.
[0121] Taking the camera application as an example, when the camera application runs on the electronic device 100, the camera application calls the interface corresponding to the camera application in the application framework layer, and then starts the camera driver by calling the hardware abstraction layer, turns on the multiple cameras 193 on the electronic device 100, and obtains the original image through the target camera. The image processing module processes the original image to obtain a preview image, and the camera application displays the preview image.
[0122] When the HDR mode is turned on, the camera application in the application layer receives the shooting instruction, calls the interface corresponding to the camera application in the application framework layer to send the shooting instruction to the image management module, and the image management module calls the smartAE encapsulation module to calculate the variable exposure sequence (the second exposure sequence). Figure 4 As shown in step ① in , the image management module transmits the shooting instruction to the shooting method base class of the second hardware abstraction layer through the connection module FilterBridgelmpl between the first hardware abstraction layer and the second hardware abstraction layer to schedule the smartAE encapsulation module to perform calculations. The smartAE encapsulation module calculates the variable exposure sequence (second exposure sequence) according to the shooting method corresponding to the current shooting scene and the shooting data of the first reference frame, and returns the variable exposure sequence (second exposure sequence) to the image management module, such as Figure 4 As shown in steps ② and ③ in . The first reference frame may be the last frame image in the cache queue when smartAE receives the shooting instruction.
[0123] The frame selection module in the image management module selects the second reference frame from the cache queue according to the shooting data of the multiple original image frames in the cache queue and the variable exposure sequence (the second exposure sequence), and determines the timestamp of the second reference frame. Among them, the frame selection module encapsulates a frame selection algorithm, which is only a general term for algorithms that can select reference frames, and the specific algorithm is not limited in the embodiment of this application.
[0124] After determining the second reference frame, the image management module schedules the smartAE encapsulation module to perform calculations again, such as Figure 4As shown in step ④ in , the image management module sends a request to the perception engine through FilterBridgelmpl, requesting the scheduling of the smartAE encapsulation module for calculation, and the request carries the timestamp of the second reference frame. Figure 4 As shown in step ⑤ in , after receiving the request, FilterBridgelmpl obtains the smartAE encapsulation module instance, obtains the shooting data of the second reference frame according to the timestamp of the second reference frame, and at this time, the scene information has been determined, and only the smartAE encapsulation module needs to be scheduled to recalculate the variable exposure sequence (first exposure sequence) according to the shooting data of the second reference frame, and return the result of the first exposure sequence to the image management module, such as Figure 4 As shown in step ⑥ in . Since the frame selection module is integrated in the first hardware abstraction layer, the perception engine and the smartAE encapsulation module are integrated in the second hardware abstraction layer, the data of the first hardware abstraction layer and the second hardware abstraction layer are not completely shared. By rescheduling the smartAE encapsulation module to re-determine the variable exposure sequence, the modification amount to the system is relatively small and easy to maintain.
[0125] The image management module sends the first exposure sequence to the image processing module, which sends it to the sensor through the kernel layer. The sensor outputs the corresponding image frames in sequence according to the first exposure sequence and reports them to the image processing module. The image processing module calls the HDR algorithm to generate an HDR image based on the corresponding image frame and the second reference frame.
[0126] Based on the above technical solution, the first calculation of the exposure sequence belongs to pre-calculation, and the exposure sequence result of the first calculation can be used in the frame selection process. The exposure sequence result of the second calculation is then sent to the image sensor, so as to ensure that the smartAE encapsulation module calculates the exposure sequence and the image processing module generates the HDR image using the second reference frame, so that the difference in exposure between the N frame in the exposure sequence and the second reference frame is small, or the difference in exposure between the S frame and the L frame in the exposure sequence and the second reference frame meets the threshold requirement, avoiding the need to discard some image frames due to subsequent verification failure, resulting in poor HDR imaging effect.
[0127] Figure 5 is a schematic flow chart of an image processing method provided in an embodiment of the present application. The method can be Figure 2 The electronic device shown is executed, or Figure 3 The modules shown are executed; the method includes steps S501 to S507, and steps S501 to S507 are described in detail below.
[0128] S501, the electronic device starts a shooting function and turns on an HDR mode.
[0129] An electronic device can start the shooting function by running a camera application. For example, a user can instruct the electronic device to run the camera application by clicking the icon of the "camera" application; or, when the electronic device is in a lock screen state, the user can instruct the electronic device to run the camera application by sliding to the right on the display screen of the electronic device. Alternatively, the electronic device is in a lock screen state, and the lock screen interface includes an icon of the camera application. The user instructs the electronic device to run the camera application by clicking the icon of the camera application. Alternatively, when the electronic device is running other applications, the application has the permission to call the camera application; the user can instruct the electronic device to run the camera application by clicking the corresponding control. For example, when the electronic device is running an instant messaging application, the user can instruct the electronic device to run the camera application by selecting the control of the camera function.
[0130] It should be understood that the above is an example of the operation of running a camera application; the electronic device can also be instructed to run the camera application through voice instructions or other methods; this application does not impose any limitation on this.
[0131] After running the camera app, users can Figure 1 The process shown turns on the HDR mode of the shooting function.
[0132] S502: The electronic device detects a shooting instruction, and the shooting instruction requests the electronic device to shoot.
[0133] After the HDR mode of the electronic device's shooting function is turned on, the user can issue a shooting instruction to request the electronic device to shoot in the HDR mode to obtain an HDR image. For example, the shooting instruction can be a user's click operation on the shooting control, and the shooting control can be such as Figure 1 The shooting button 20 shown in (d) in FIG. It should be understood that the electronic device can also be triggered to shoot through voice commands or gesture commands, and this application does not make any limitation to this.
[0134] When the shooting instruction is a user's click operation on the shooting control, the action of "clicking the shooting control" can be subdivided into two stages: pressing and lifting. In one implementation, when the user's pressing of the shooting control is detected, the application layer can send a shooting instruction to the HAL layer and perform subsequent processes, such as selecting frames, calculating exposure sequences, and outputting original image frames during the pressing and lifting of the action of "clicking the shooting control". In the lifting stage, the image sensor may have output the second image frame. In this way, the image processing method of the present application can improve the shooting response speed.
[0135] In another implementation, when it is detected that the user presses and lifts the shooting control, the application layer sends a shooting instruction to the HAL layer and performs subsequent processes.
[0136] S503: The electronic device determines a second exposure sequence according to a third image frame in the multiple original image frames.
[0137] Among them, multiple frames of original image frames are cached in the cache queue during the preview process, and the shooting data of each frame of the original image is also stored during the cache, and the shooting data includes AE statistical data. The AE statistical data may include image brightness, exposure parameters, etc. The exposure parameters may include exposure time, sensitivity, aperture factor, etc.
[0138] The electronic device can determine the number of image frames required to generate an HDR image, the exposure parameters of each image frame, and the frame output sequence based on the AE statistical data of the third image frame in the multiple frames of the original image frames. The exposure parameters are arranged in the frame output sequence to generate a second exposure sequence. It should be understood that the second exposure sequence includes multiple groups of exposure parameters, and at least two groups of exposure parameters in the multiple groups of exposure parameters have different values, such as different exposure time values, different sensitivity values, or different values of each parameter.
[0139] Exemplarily, taking exposure time as an example, the electronic device can calculate the exposure times corresponding to the required long frame images, medium frame images, and short frame images according to the exposure time of the third image frame, and determine the required number of long frame images, medium frame images, and short frame images. For example, when shooting HDR images in a daytime scene, one long frame image, one medium frame image, and two short frame images are required, in the order of short frame image, medium frame image, short frame image, and long frame image. The exposure times are 5ms, 10ms, 5ms, and 50ms, respectively. The second exposure sequence can be expressed as {S, N, S, L, S=5, N=10, S=5, L=50}.
[0140] It should be noted that the third image frame is a middle frame image and corresponds to the aforementioned first reference frame.
[0141] The cache queue may be a ZSL queue. When the camera application is in preview mode, the image sensor stores the collected original image frames into the ZSL queue one by one in time sequence. When all storage positions in the ZSL queue are occupied, the ZSL queue replaces the historical image frames in the ZSL queue one by one with the latest collected original image frames in real time. Figure 6 This is a schematic diagram of the structure of a ZSL queue applicable to the embodiment of the present application. Figure 6, taking a ZSL queue including 8 storage positions as an example, the ZSL queue can store up to 8 image frames at the same time. When the number of image frames in the ZSL queue is less than 8, the image frames are stored in the ZSL queue from left to right in a time sequence, that is, the first image frame output earliest is stored in the storage position 1, the second image frame is stored in the storage position 2, and so on; when the number of image frames in the ZSL queue is equal to 8, if there is a ninth image frame to be stored, the first image frame will be deleted, the second image frame will be moved to the right to the storage position 1, the third image frame will be moved to the right to the storage position 2, and so on, the eighth image frame will be moved up to the storage position 7, and at this time the storage position 8 is not occupied, and the ninth image frame will be stored in the storage position 8.
[0142] It should be understood that the above ZSL queue structure is only an example, and the ZSL queue may also include more storage bits, and the number of storage bits in the ZSL queue is not limited in this application. The storage method of the image frame in the above ZSL queue is only an example, and the specific storage method is not limited in this application.
[0143] In one example, the third image frame may be the last image frame in the cache queue when the smartAE encapsulation module receives the shooting instruction.
[0144] S504: The electronic device determines a first image frame from the multiple original image frames according to the second exposure sequence and the shooting data corresponding to the multiple original image frames.
[0145] It should be understood that from the upper application (such as Figure 1 The camera application shown in FIG. 1 receives the user's shooting command, and it takes time for the smartAE encapsulation module of the HAL layer to receive the shooting command (such as Figure 6 During this time, the Sensor may output multiple raw image frames. Figure 6 As shown in the figure, it is assumed that when the Sensor outputs the 3rd raw image frame, the upper-layer application receives the shooting instruction; when the Sensor outputs the 7th raw image frame, the shooting instruction is passed to the smartAE encapsulation module of the HAL layer. Figure 6 As shown in the delay time, the 7th frame image is not the frame image at the moment when the user issues the shooting command. Therefore, the 7th frame image may not be the frame image that the user really wants, and the HDR image generated based on the 7th frame image may not satisfy the user.
[0146] In an embodiment of the present application, the electronic device or the frame selection module in the electronic device can determine which shooting scene the current shooting is in according to the frame output order in the second exposure sequence, and then select the first image frame from the multiple original image frames according to the shooting data corresponding to the multiple original image frames, and generate an HDR image based on the first image frame, wherein the timestamp corresponding to the first image frame is earlier than the timestamp corresponding to the third image frame. By selecting the original image frame output closer to the time when the user issues the shooting command to generate the HDR image, a what-you-see-is-what-you-get effect can be achieved, thereby improving the user experience.
[0147] Among them, a frame selection algorithm is set in the frame selection module. The frame selection algorithm is just a general term for algorithms that can select reference frames, and the specific algorithm is not limited in the embodiments of this application.
[0148] Exemplarily, an image frame with the smallest angular velocity may be selected from multiple frames of original image frames as the first image frame. The angular velocity may be acquired by a gyroscope sensor. The smaller the angular velocity, the smaller the jitter when the image sensor acquires the original image frame, and the larger the angular velocity, the larger the jitter when the image sensor acquires the original image frame. The image quality of the first image frame selected in this way is better.
[0149] For example, an image frame with a relatively low exposure can be selected from multiple original image frames according to the exposure time as the first image frame. The relatively low exposure can retain more details, so the first image frame selected has more details, which is conducive to merging with other image frames to generate a higher quality HDR image.
[0150] Exemplarily, an image frame having a timestamp closest to the time when the user issues the shooting instruction may be selected from multiple original image frames as the first image frame.
[0151] It should be noted that the first image frame is a medium frame image. The first image frame corresponds to the aforementioned second reference frame.
[0152] S505: The electronic device determines a first exposure sequence according to the first image frame.
[0153] The electronic device re-determines the number of image frames required to generate an HDR image, the exposure parameters of each image frame, and the frame output sequence based on the AE statistical data of the first image frame in the multiple original image frames, and arranges the exposure parameters in the frame output sequence to generate a first exposure sequence.
[0154] Exemplarily, the electronic device can calculate the exposure times corresponding to the required long frame images, medium frame images, and short frame images according to the exposure time of the first image frame, and determine the number of required long frame images, medium frame images, and short frame images.
[0155] It should be understood that the first exposure sequence includes multiple groups of exposure parameters. The parameters in one group of exposure parameters may include exposure time, sensitivity, aperture factor, etc., and the values of at least two groups of exposure parameters in the multiple groups of exposure parameters are different, for example, the values of exposure time are different, the values of sensitivity are different, or the values of each parameter are different.
[0156] It should be understood that for different shooting scenes, such as daytime and night scenes, the long and short frames, frame output order, and exposure parameters in the first exposure sequence may be different.
[0157] S506: The electronic device sequentially acquires a plurality of second image frames according to the first exposure sequence.
[0158] The electronic device or the module of the HAL layer of the electronic device sends the first exposure sequence to the image sensor, and the image sensor outputs the second image frames in sequence according to the frame output order and the exposure parameters corresponding to each frame, wherein the second image frames correspond one-to-one to the exposure parameters.
[0159] S507: The electronic device generates a high dynamic range image according to the plurality of second image frames and the first image frame.
[0160] In the embodiment of the present application, the first image frame is used as a reference, and multiple frames of the second image frame are fused into the first image frame through an exposure fusion algorithm, so that the dark areas in the image frame are brightened by long exposure and the bright areas are restored by short exposure, thereby generating an HDR image with appropriate brightness and darkness of the entire HDR image.
[0161] In another implementation, Figure 7 is a schematic flow chart of another image processing method provided in an embodiment of the present application. The method can be Figure 2 The electronic device shown is executed, or Figure 3 The modules shown are executed; the method includes steps S701 to S706, and steps S701 to S706 are described in detail below.
[0162] S701, the electronic device starts a shooting function and turns on an HDR mode.
[0163] An electronic device can start the shooting function by running a camera application. For example, a user can instruct the electronic device to run the camera application by clicking the icon of the "camera" application; or, when the electronic device is in a lock screen state, the user can instruct the electronic device to run the camera application by sliding to the right on the display screen of the electronic device. Alternatively, the electronic device is in a lock screen state, and the lock screen interface includes an icon of the camera application. The user instructs the electronic device to run the camera application by clicking the icon of the camera application. Alternatively, when the electronic device is running other applications, the application has the permission to call the camera application; the user can instruct the electronic device to run the camera application by clicking the corresponding control. For example, when the electronic device is running an instant messaging application, the user can instruct the electronic device to run the camera application by selecting the control of the camera function.
[0164] It should be understood that the above is an example of the operation of running a camera application; the electronic device can also be instructed to run the camera application through voice instructions or other methods; this application does not impose any limitation on this.
[0165] After running the camera app, users can Figure 1 The process shown turns on the HDR mode of the shooting function.
[0166] S702: The electronic device detects a shooting instruction, and the shooting instruction requests the electronic device to shoot.
[0167] After the HDR mode of the electronic device's shooting function is turned on, the user can issue a shooting instruction to request the electronic device to shoot in the HDR mode to obtain an HDR image. For example, the shooting instruction can be a user's click operation on the shooting control, and the shooting control can be such as Figure 1 The shooting button 20 shown in (d) in FIG. It should be understood that the electronic device can also be triggered to shoot through voice commands or gesture commands, and this application does not make any limitation to this.
[0168] When the shooting instruction is a user's click operation on the shooting control, the action of "clicking the shooting control" can be subdivided into two stages: pressing and lifting. In one implementation, when the user's pressing of the shooting control is detected, the application layer can send a shooting instruction to the HAL layer and perform subsequent processes, such as selecting frames, calculating exposure sequences, and outputting original image frames during the pressing and lifting of the action of "clicking the shooting control". In the lifting stage, the image sensor may have output the second image frame. In this way, the image processing method of the present application can improve the shooting response speed.
[0169] In another implementation, when it is detected that the user presses and lifts the shooting control, the application layer sends a shooting instruction to the HAL layer and performs subsequent processes.
[0170] S703: The electronic device determines a first image frame from a plurality of original image frames acquired during the preview process.
[0171] In the embodiment of the present application, the multiple frames of original image frames acquired during the preview process can be cached in the aforementioned ZLS queue. During the caching process, the shooting data of each original image frame can also be cached.
[0172] The electronic device or the frame selection module in the electronic device selects a first image frame from multiple original image frames according to the shooting data corresponding to the multiple original image frames, and generates an HDR image based on the first image frame. By selecting the original image frame output closer to the time when the user triggers the shooting command to generate the HDR image, a WYSIWYG effect can be achieved, which improves the user experience.
[0173] Exemplarily, an image frame with the smallest angular velocity may be selected from multiple frames of original image frames as the first image frame. The angular velocity may be acquired by a gyroscope sensor. The smaller the angular velocity, the smaller the jitter when the image sensor acquires the original image frame, and the larger the angular velocity, the larger the jitter when the image sensor acquires the original image frame. The image quality of the first image frame selected in this way is better.
[0174] Exemplarily, an image frame with a relatively low exposure may be selected from a plurality of original image frames according to the exposure time as the first image frame.
[0175] Exemplarily, an image frame having a timestamp closest to the time when the user issues the shooting instruction may be selected from multiple image frames as the first image frame.
[0176] Exemplarily, the first image frame may be selected in combination with the above-mentioned angular velocity, exposure time, and timestamp.
[0177] S704: The electronic device determines a first exposure sequence according to the first image frame.
[0178] The electronic device re-determines the number of image frames required to generate an HDR image, the exposure parameters of each image frame, and the frame output sequence based on the AE statistical data of the first image frame in the multiple original image frames, and arranges the exposure parameters in the frame output sequence to generate a first exposure sequence.
[0179] It should be understood that the first exposure sequence includes multiple groups of exposure parameters, and the parameters in one group of exposure parameters may include exposure time, sensitivity, aperture factor, etc., and the values of at least two groups of exposure parameters in the multiple groups of exposure parameters are different, for example, the values of exposure time are different, the values of sensitivity are different, or the values of each parameter are different. Therefore, the exposure amount of at least two frames in the output multiple frames of images is different.
[0180] It should be understood that for different shooting scenes, such as daytime and night scenes, the long and short frames, frame order, and exposure parameters in the first exposure sequence may be different. In the embodiment of the present application, the shooting scene algorithm in the shooting method base class can be used to determine which shooting scene the current shooting is in, and then determine the first exposure sequence according to the shooting scene and the first image frame.
[0181] Exemplarily, taking exposure time as an example, the electronic device calculates the exposure times corresponding to the required long frame images, medium frame images, and short frame images according to the exposure time of the first image frame, and determines the required number of long frame images, medium frame images, and short frame images. For example, when shooting HDR images in a daytime scene, one long frame image, one medium frame image, and two short frame images are required, in the order of short frame image, medium frame image, short frame image, and long frame image. The exposure times are 5ms, 10ms, 5ms, and 50ms, respectively. The first exposure sequence can be expressed as {S, N, S, L, S=5, N=10, S=5, L=50}.
[0182] S705: The electronic device sequentially acquires a plurality of second image frames according to the first exposure sequence.
[0183] The electronic device or the module of the HAL layer of the electronic device sends the first exposure sequence to the image sensor, and the image sensor outputs the second image frames in sequence according to the frame output order and the exposure parameters corresponding to each frame, wherein one second image frame corresponds one-to-one to a set of exposure parameters.
[0184] S706: The electronic device generates a high dynamic range image according to the plurality of second image frames and the first image frame.
[0185] In the embodiment of the present application, the first image frame is used as a reference, and multiple frames of the second image frame are fused into the first image frame through an exposure fusion algorithm, so that the dark areas in the image frame are brightened by long exposure and the bright areas are restored by short exposure, thereby generating an HDR image with appropriate brightness and darkness of the entire HDR image.
[0186] Based on the above technical solution, when an HDR image is generated according to a first image frame and multiple second image frames, since the multiple second image frames are generated according to a first exposure sequence, the exposure parameters in the first exposure sequence are used to determine the exposure amount of the second image frame, and the first exposure sequence is determined according to the first image frame, that is, the same image frame (that is, the first image frame) is used when determining the first exposure sequence and when generating an HDR image in combination with the multiple second image frames. Therefore, the difference between the exposure amount of the multiple second image frames and the exposure amount of the first image frame is small.
[0187] Compared with the situation where different image frames are used when determining the first exposure sequence and when generating an HDR image in combination with multiple second image frames, for example, the first image frame is used when calculating the first exposure sequence, and multiple second image frames and other image frames are used when generating the HDR image, the difference in exposure between the first image frame and the other image frames may be large under unstable conditions. The present application uses the first image frame and is therefore not affected by unstable conditions. This can avoid the problem of discarding some image frames in the multiple second image frames due to the large difference in exposure between the multiple second image frames and other image frames in the subsequent process of generating HDR images, that is, not using all the second image frames to generate the HDR image, resulting in poor HDR imaging effect. Moreover, the method provided in the embodiment of the present application can present better HDR imaging effects under various unstable conditions and improve shooting stability.
[0188] Combination of the above Figures 1 to 7 The image processing method provided by the embodiment of the present application is described in detail. Figure 8 It should be understood that the device in the embodiment of the present application can execute various methods in the aforementioned embodiment of the present application, that is, the specific working process of the following various products can refer to the corresponding process in the aforementioned method embodiment.
[0189] Figure 8 800 is a schematic diagram of an electronic device provided in an embodiment of the present application. The device 800 includes a detection module 810 and a processing module 820 .
[0190] The detection module 810 is used to detect a shooting instruction, which requests the electronic device to shoot, wherein the high dynamic range HDR mode of the shooting function of the electronic device has been turned on when the shooting instruction is detected. The processing module 820 is used to respond to the shooting instruction, determine a first image frame from multiple frames of original image frames cached during the preview process, determine a first exposure sequence based on the first image frame, the first exposure sequence includes multiple sets of exposure parameters, and at least two sets of exposure parameters in the multiple sets of exposure parameters have different values; sequentially obtain multiple frames of second image frames according to the first exposure sequence, and the second image frames correspond to the multiple sets of exposure parameters; and generate a high dynamic range image based on the multiple frames of second image frames and the first image frame.
[0191] The device 800 further includes a storage module 830 (not shown in the figure), which is used to store multiple original image frames cached during the preview process and the shooting data of each original image frame.
[0192] The shooting data may include one or more of the following: angular velocity, exposure time, and timestamp. The exposure parameters may include exposure time and sensitivity.
[0193] Optionally, as an embodiment, the processing module 820 is specifically used to: determine a second exposure sequence based on a third image frame in the multiple frames of original image frames; determine a first image frame from the multiple frames of original image frames based on the second exposure sequence and shooting data corresponding to the multiple frames of original image frames, and the timestamp corresponding to the first image frame is earlier than the timestamp corresponding to the third image frame.
[0194] Optionally, as an embodiment, the third image frame is the last frame of the multiple original image frames corresponding to when the shooting instruction is detected.
[0195] Optionally, as an embodiment, the processing module 820 is further specifically configured to: determine a first image frame from a plurality of original image frames according to a moment when a shooting instruction is detected.
[0196] Among them, the first image frame is a medium exposure image frame, and the first exposure sequence includes at least two corresponding exposure parameters of a long exposure image frame, a medium exposure image frame, and a short exposure image frame, wherein the exposure time of the long exposure image frame is greater than the exposure time of the medium exposure image frame, and the exposure time of the medium exposure image frame is greater than the exposure time of the short exposure image frame.
[0197] Optionally, as an embodiment, the shooting instruction includes a first operation, and the first operation is an operation of a user pressing a shooting control of a shooting function in the electronic device.
[0198] It should be noted that the above electronic device is embodied in the form of a functional module. The term "module" here can be implemented in the form of software and / or hardware, and is not specifically limited to this.
[0199] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0200] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0201] In addition, the embodiments of the present application also provide a device, which can be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory, so that the chip executes the methods in the above-mentioned method embodiments. The chip can be implemented using the following circuits or devices: one or more field programmable gate arrays (FPGA), programmable logic devices (PLD), controllers, state machines, gate logic, discrete hardware components, any other suitable circuits, or any combination of circuits capable of performing the various functions described throughout the present application.
[0202] In the embodiments provided in the present application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0203] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0204] The electronic device provided in this embodiment is used to execute the above method, so the same effect as the above implementation method can be achieved. In the case of an integrated unit, the electronic device may include a processing module, a storage module and a communication module. Among them, the processing module can be used to control and manage the actions of the electronic device, for example, it can be used to support the electronic device to execute the steps performed by the processing unit. The storage module can be used to support the electronic device to execute stored program codes and data, etc. The communication module can be used to support the communication between the electronic device and other devices.
[0205] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0206] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0207] In the above description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0208] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0209] It should also be understood that the "multiple" mentioned in the specification and the appended claims of this application refers to two or more. In the description of this application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, which means any combination of one or more of the items listed in the association and all possible combinations, and includes these combinations, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0210] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0211] In addition, in order to clearly describe the technical solution of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and cannot be understood as indicating or implying relative importance, and words such as "first" and "second" do not necessarily limit differences.
[0212] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0213] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. An image processing method, characterized in that: Applied to electronic equipment, the method comprises: A shooting instruction is detected, wherein the shooting instruction requests the electronic device to shoot, wherein a high dynamic range (HDR) mode of a shooting function of the electronic device has been turned on; In response to the shooting instruction, determining a second exposure sequence according to a third image frame among the multiple original image frames buffered during the preview process; Determine a first image frame from the multiple original image frames according to the second exposure sequence and the shooting data corresponding to the multiple original image frames, wherein a timestamp corresponding to the first image frame is earlier than a timestamp corresponding to the third image frame; Determining a first exposure sequence according to the first image frame, the first exposure sequence comprising a plurality of groups of exposure parameters, at least two groups of exposure parameters of the plurality of groups of exposure parameters having different values; sequentially acquiring a plurality of second image frames according to the first exposure sequence, wherein the second image frames correspond to the plurality of sets of exposure parameters; A high dynamic range image is generated according to the multiple second image frames and the first image frame.
2. The method according to claim 1, characterized in that: The third image frame is the last frame of the multiple original image frames corresponding to when the shooting instruction is detected.
3. The method according to claim 1 or 2, characterized in that: The shooting data includes one or more of the following: angular velocity, exposure time, and timestamp, wherein the timestamp is the time when the original image frame is acquired.
4. The method according to claim 1, characterized in that: The exposure parameter includes at least one of exposure time and sensitivity.
5. The method according to claim 4, characterized in that The first image frame is a medium exposure image frame, and the first exposure sequence includes at least two corresponding exposure parameters of a long exposure image frame, a medium exposure image frame, and a short exposure image frame, wherein the exposure time of the long exposure image frame is greater than the exposure time of the medium exposure image frame, and the exposure time of the medium exposure image frame is greater than the exposure time of the short exposure image frame.
6. The method according to claim 1, characterized in that The shooting instruction includes a first operation, where the first operation is an operation of a user pressing a shooting control of the shooting function of the electronic device.
7. An electronic device, characterized in that: include: one or more processors; one or more memories; The memory stores one or more programs, and when the one or more programs are executed by the processor, the electronic device executes the method according to any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Image photographing method and device, terminal, and storage medium
CN107809593A
Photography method, related equipment and computer storage medium
CN108337445A
An image shooting method and terminal equipment
CN109743506A
Image processing method and device, electronic equipment and computer readable storage medium
CN111402135A
Image processing method and device, electronic equipment and storage medium
CN115205172A
