CN117714835A - Image processing method, electronic device and readable storage medium - Google Patents
Image processing method, electronic device and readable storage medium Download PDFInfo
- Publication number
- CN117714835A CN117714835A CN202310970674.3A CN202310970674A CN117714835A CN 117714835 A CN117714835 A CN 117714835A CN 202310970674 A CN202310970674 A CN 202310970674A CN 117714835 A CN117714835 A CN 117714835A
- Authority
- CN
- China
- Prior art keywords
- image
- frame
- exposure
- image frame
- frames
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/63—Control of cameras or camera modules by using electronic viewfinders
- H04N23/631—Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/667—Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/70—Circuitry for compensating brightness variation in the scene
- H04N23/741—Circuitry for compensating brightness variation in the scene by increasing the dynamic range of the image compared to the dynamic range of the electronic image sensors
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N25/00—Circuitry of solid-state image sensors [SSIS]; Control thereof
- H04N25/50—Control of the SSIS exposure
- H04N25/57—Control of the dynamic range
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Studio Devices (AREA)
Abstract
The application discloses an image processing method, electronic equipment and a readable storage medium, and relates to the technical field of image processing, wherein in the method, under the condition that an HDR mode of a shooting function of the electronic equipment is started, the electronic equipment detects a shooting instruction for requesting the electronic equipment to shoot, and the electronic equipment determines a first image frame from multi-frame original image frames cached in a preview process in response to the shooting instruction; and determining a first exposure sequence according to the first image frame, sequentially acquiring a plurality of frames of second image frames by the electronic equipment according to the first exposure sequence, and generating an HDR image according to the plurality of frames of second image frames and the first image frame. Based on the technical scheme, when an HDR image is shot in an unstable scene, the difference of exposure amounts of the multi-frame second image frame and the first image frame is small, so that when the HDR image is generated by using the multi-frame second image frame and the first image frame, a better HDR imaging effect can be obtained, and the shooting stability is improved.
Description
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to an image processing method, an electronic device, and a readable storage medium.
Background
Currently, users have increasingly demanded photographic effects on electronic devices, with various technologies for improving image quality, such as high dynamic range imaging (high dynamic range, HDR). High dynamic range imaging typically acquires multiple images of the same scene with different exposures, and then combines the images with different exposures into one HDR image, e.g., when the scene is taken, the scene environment is widely shaded, the taken image is easily too bright or too dark to see details, and an image with more details can be obtained through HDR imaging.
However, when synthesizing an HDR image based on the conventional method, in the case where the electronic device is unstable such as a shake or movement of a person or an object in a shooting scene, the imaging effect of the HDR is poor.
Disclosure of Invention
The application provides an image processing method, electronic equipment and a readable storage medium, which can improve the HDR imaging effect under the condition that the electronic equipment shakes or people and objects move in a shooting scene. The technical scheme is as follows:
in a first aspect, an embodiment of the present application provides an image processing method, applied to an electronic device, where the method includes: under the condition that a high dynamic range HDR mode of a shooting function of the electronic equipment is started, the electronic equipment detects a shooting instruction for requesting the electronic equipment to shoot, and the electronic equipment determines a first image frame from multi-frame original image frames cached in a preview process in response to the shooting instruction; and determining a first exposure sequence according to the first image frames, sequentially acquiring a plurality of frames of second image frames according to the first exposure sequence by the electronic equipment, and generating a high dynamic range image according to the plurality of frames of second image frames and the first image frames. The first exposure sequence comprises a plurality of groups of exposure parameters, values of at least two groups of exposure parameters in the plurality of groups of exposure parameters are different, and the second image frame corresponds to the plurality of groups of exposure parameters.
Based on the above-described technical solution, when generating an HDR image from a first image frame and a plurality of frames of second image frames, since the plurality of frames of second image frames are generated from a first exposure sequence in which exposure parameters are used to determine the exposure amount of the second image frames, and the first exposure sequence is determined from the first image frames, that is, the same image frame (that is, the first image frame) is used when determining the first exposure sequence and when generating the HDR image in combination with the plurality of frames of second image frames, the difference between the exposure amount of the plurality of frames of second image frames and the exposure amount of the first image frame is small.
Compared with the situation that different image frames are used when determining the first exposure sequence and when generating the HDR image by combining the multi-frame second image frames, for example, the first image frame is used when calculating the first exposure sequence, and the multi-frame second image frame and other image frames are used when generating the HDR image, the difference between the exposure amounts of the first image frame and the other image frames under the unstable condition can be larger, and the first image frames are used in the application, so that the influence of the unstable condition is avoided, the problem that the HDR imaging effect is poor due to the fact that part of the image frames in the multi-frame second image frame are discarded due to the fact that the exposure amount difference between the multi-frame second image frame and the other image frames is too large in the process of generating the HDR image, namely, all the second image frames are not used for generating the HDR image, can be solved, and the method provided by the embodiment of the application can display good HDR imaging effect under various unstable conditions, and improve shooting stability.
The multi-frame original image frames acquired in the preview process can be cached in a queue according to a time sequence. The queue may buffer a preset number of image frames, for example, up to 8 image frames may be stored simultaneously. The buffer memory can also store shooting data of each frame of original image, wherein the shooting data can comprise angular velocity, time stamp, exposure parameters and the like. The exposure parameters may include exposure time, sensitivity, aperture coefficient, and the like. Where the time stamp refers to the time at which the original image frame was acquired.
The electronic device may determine the first exposure sequence from the captured data of the first image frame. It should be appreciated that the first exposure sequence includes a plurality of sets of exposure parameters, and the parameters in one set of exposure parameters may include exposure time, sensitivity, aperture coefficient, etc., and that at least two of the plurality of sets of exposure parameters may have different values, such as different values for exposure time, different values for sensitivity, or different values for each of the plurality of sets of exposure parameters.
With reference to the first aspect and the foregoing implementation manner, the first image frame is a middle exposure image frame, and the first exposure sequence includes at least two corresponding exposure parameters in a long exposure image frame, a middle exposure image frame, and a short exposure image frame, where an exposure time of the long exposure image frame is greater than an exposure time of the middle exposure image frame, and an exposure time of the middle exposure image frame is greater than an exposure time of the short exposure image frame. That is, at least two of the long exposure image frame, the medium exposure image frame, and the short exposure image frame are included in the multi-frame second image frame, and the multi-frame second image frames need to be sequentially output in the determined frame out order.
It will be appreciated that the length frames, frame out order, exposure parameters in the first exposure sequence may be different for different shot scenes, such as daytime and night time scenes. For example, in a certain photographing scene, the multiple frames of second image frames to be output are one frame of long exposure image frame, one frame of middle exposure image frame and one frame of short exposure image frame in sequence, and in another photographing scene, the multiple frames of second image frames to be output are one frame of short exposure image frame, one frame of middle exposure image frame, two frames of short exposure image frame and one frame of long exposure image frame in sequence.
With reference to the first aspect, in some implementations, the electronic device may determine the second exposure sequence according to a third image frame from a plurality of frames of original image frames buffered in the preview process; and determining a first image frame from the multi-frame original image frames according to the second exposure sequence and shooting data corresponding to the multi-frame original image frames, wherein the time stamp corresponding to the first image frame is earlier than the time stamp corresponding to the third image frame.
With reference to the first aspect and the foregoing implementation manner, in some implementation manners, the third image frame may be a last frame in multiple frames of original image frames corresponding to when the shooting instruction is detected.
With reference to the first aspect, in some implementations, the electronic device may determine the first image frame from a plurality of original image frames according to a time when the shooting instruction is detected.
In the implementation manner, the selected first image frame is closer to the original image frame output by the time when the user sends the shooting instruction, and is used as the first image frame to generate the HDR image, so that the effect of what you see is what you get can be achieved, and the user experience is improved.
With reference to the first aspect and the implementations described above, in some implementations, the exposure parameter includes at least one of exposure time and sensitivity.
With reference to the first aspect and the foregoing implementation manner, in some implementation manners, the shooting instruction may be a click operation of a shooting control by a user, or may be a voice instruction, or a gesture instruction, or the like.
When the shooting instruction is a click operation of the shooting control by the user, the action of clicking the shooting control can be subdivided into two stages of pressing and lifting. In one implementation manner, when detecting the operation of pressing a shooting control of a shooting function in the electronic device by a user, a shooting instruction can be issued, a subsequent procedure is performed, and the processes of selecting frames, calculating an exposure sequence, outputting a second image frame and the like are performed in the pressing and lifting process of the action of clicking the shooting control, and in the lifting stage, the image sensor may already output the second image frame, so that waiting processing time can be reduced, and shooting response speed is improved.
In a second aspect, an embodiment of the present application provides an electronic device, including: one or more processors; one or more memories; the memory stores one or more programs that, when executed by the processor, cause the electronic device to perform any of the possible methods of the first aspect described above.
In a third aspect, an embodiment of the present application provides an apparatus, where the apparatus is included in an electronic device, and the apparatus has a function of implementing the foregoing aspects and a possible implementation manner of the foregoing aspects of the electronic device. The functions may be realized by hardware, or may be realized by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the functions described above. Such as a display module or unit, a detection module or unit, a processing module or unit, etc.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having instructions stored therein, which when run on a computer, cause the computer to perform the method of the first aspect described above.
In a fifth aspect, embodiments of the present application provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the first aspect described above.
The technical effects obtained by the second, third, fourth and fifth aspects are similar to the technical effects obtained by the corresponding technical means in the first aspect, and are not described in detail herein.
Drawings
Fig. 1 illustrates an example of an application scenario provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of an example of an electronic device according to an embodiment of the present application;
FIG. 3 shows a block diagram of an example software architecture provided by an embodiment of the present application;
FIG. 4 is a flowchart of an example of a software-based architecture according to an embodiment of the present application;
fig. 5 is a flowchart illustrating an example of an image processing method according to an embodiment of the present application;
FIG. 6 is a schematic diagram illustrating an exemplary cache queue according to an embodiment of the present disclosure;
fig. 7 is a flowchart illustrating another image processing method according to an embodiment of the present application;
fig. 8 shows a schematic diagram of an example of an apparatus according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, embodiments of the present application will be described in further detail below with reference to the accompanying drawings. The terms "first" and "second" are used below for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present embodiment, unless otherwise specified, the meaning of "plurality" is two or more.
First, some terms in the embodiments of the present application are explained for easy understanding by those skilled in the art.
1. Exposure (EV for short)
The exposure refers to the intensity and duration of the brightness perceived by the camera. When shooting by a camera, the exposure amount may be too high or too low due to the limitation of the dynamic range, which directly results in overexposure or underexposure of the shot object and the background. If overexposure is excessive, the photographed image will be too bright to embody the bright details; if the exposure is insufficient, the photographed image is dark, and dark details cannot be represented.
The exposure parameters include aperture, exposure time, and sensitivity. Wherein the exposure time can be adjusted by controlling the shutter speed. The faster the shutter speed, the shorter the exposure time, and the smaller the exposure amount; conversely, the slower the shutter speed, the longer the exposure time, the more the exposure amount, and the image brightness increases.
Wherein the larger the aperture (the smaller the value), such as F2.8, the more the exposure, the image brightness increases. The smaller the aperture (the larger the value), such as F16, the less the exposure, and the image brightness decreases.
The sensitivity is used for measuring the sensitivity of the photosensitive element to light. Specifically, the higher the sensitivity is, the stronger the resolving power to light is, the more light is sensed, and the image brightness is increased; conversely, the lower the sensitivity, the weaker the resolving power for the light, the less light is sensed and the image brightness decreases. The sensitivity is often expressed as an ISO sensitivity value, which can be divided into several gear steps, such as 50, 100, 200, 400, 800, 1600, 3200, … …. The higher the ISO sensitization value, the stronger the sensitization capability of the sensitization component.
In practical application, the exposure during shooting can be controlled by controlling parameters such as aperture, exposure time, sensitivity and the like, so that the shooting effect can be controlled, and the generated image can be more vivid in color, higher in contrast and clearer in image detail by reasonably adjusting the exposure parameters.
2. Long frame image, middle frame image and short frame image
In the embodiment of the present application, for convenience of description, an image frame with a long exposure time is referred to as a long frame image or a long exposure image frame, and is denoted as an L frame. The image frame with short exposure time is referred to as a short frame image or short exposure image frame, and is denoted as an S frame. An image frame between exposure times of a long frame image and a short frame image is referred to as a mid-frame image or a mid-exposure image frame, and is denoted as N frames. The exposure time of the long frame image is longer than that of the middle frame image, and the exposure time of the middle frame image is longer than that of the short frame image. It should be noted that, the exposure time is relatively long, and the specific exposure time can be determined according to the actual requirement, which is not limited in the embodiment of the present application.
3. High Dynamic Range (HDR for short)
The high dynamic range is a technique of synthesizing an image having a high dynamic range from images of different exposure amounts over a plurality of consecutive frames. The bright portions of the high dynamic range image are not overexposed and the dark portion details are clearly visible relative to the normal image, enabling more dynamic range and image details to be provided.
The foregoing is a brief description of the terminology involved in the embodiments of the present application, and is not repeated below.
An HDR mode or function may be provided in the photographing function of the electronic device. Fig. 1 shows an interface schematic for turning on HDR mode in a camera application in an embodiment of the present application. As shown in fig. 1 (a), a camera application is installed on the electronic device. Illustratively, in response to a click operation of the camera application by the user, the electronic device runs the camera application, displaying a photographing interface as shown in (b) in fig. 1. The capture interface includes a plurality of options for providing to a user to select different capture modes. For example, a large aperture mode, a night view mode, a portrait mode, a photographing mode, a video mode, a professional mode, more, and the like.
Clicking the "more" option by the user may display a corresponding menu bar as shown in fig. 1 (c) with the HDR control 11 displayed in the menu bar, and in response to a triggering operation by the user on the HDR control 11, the electronic device enables the HDR mode. As shown in fig. 1 (d), after the electronic device enables the HDR mode, an HDR flag 12 is displayed in the shooting interface, prompting the user that the current camera has turned on the HDR mode. The photographing interface further includes a photographing button 20 and a preview window 30, which may display a preview image. In the HDR mode, in response to a trigger operation (an example of a photographing instruction) of the photographing button 20 by the user, the camera may issue a photographing instruction to the image sensor, and the image sensor outputs image frames of different exposure amounts, from which the electronic device generates an HDR image.
The electronic device may buffer the original image frames output by the image sensor (sensor) in a buffer queue during the preview process, where the buffer queue may buffer multiple frames of the original image frames. During the period from when the application receives the shooting instruction of the user to when the processing module of the electronic equipment receives the shooting instruction, the image frames output by the sensor can be cached in the cache queue.
In one implementation, in response to a shooting instruction from a user, the electronic device may buffer a last frame image (denoted as an original image frame z, e.g., a 7 th frame image shown in fig. 6) in the queue according to the shooting instruction received, and determine an exposure sequence according to the original image frame z; and a frame of image frame (denoted as original image frame y, as the 2 nd frame image shown in fig. 6) with better image quality is selected from the buffer queue. The camera application issues an exposure sequence to the image sensor, which outputs a multi-frame original image frame m according to the exposure sequence, and the electronic device generates an HDR image according to the original image frame y and the multi-frame original image frame m.
In the above implementation, different image frames are used in determining the exposure sequence than in generating the HDR image in combination with the multi-frame second image frame. Since the exposure sequence of the original image frame m is calculated using the original image frame z, the difference between the exposure amount of the multi-frame original image frame m and the exposure amount of the original image frame z is small, and the original image frame z and the original image frame y may not be one frame, and the difference between the exposure amount of the original image frame z and the exposure amount of the original image frame y may be too large in a moving scene or a scene where an electronic device shakes, shakes or has an object, a person moves or the like and an unstable scene, and thus, the difference between the exposure amount of the multi-frame original image frame m and the exposure amount of the original image frame y may be too large, for example, the difference between the exposure amount of a middle frame image in the multi-frame original image frame m and the exposure amount of the original image frame y may be too large. The original image frame m with an excessively large exposure difference from the original image frame y is discarded, which may result in that a part of the original image frame m is used when the HDR image is subsequently generated, that is, all second image frames are not used to generate the HDR image, so that the original image frames m and the original image frame y of the multi-frame cannot be completely fused, resulting in poor HDR imaging effect, for example, lost HDR effect, overexposed image, noisy image, etc.
In view of this, in the HDR mode, in response to a shooting instruction, the electronic device may select a first image frame from the buffer queue, determine a first exposure sequence according to the first image frame, send the first exposure sequence to the image sensor, and the image sensor sequentially outputs a plurality of frames of second image frames according to the first exposure sequence, so that the electronic device generates an HDR image according to the first image frame and the second image frame.
In the method of the embodiment of the present application, when an HDR image is generated according to a first image frame and a plurality of second image frames in an unstable scene, since the plurality of second image frames are generated according to a first exposure sequence, and the first exposure sequence is determined according to the first image frame, the difference between the exposure amounts of the plurality of second image frames and the exposure amounts of the first image frames is small, that is, the same image frame (that is, the first image frame) is used when determining the first exposure sequence and when generating the HDR image by combining the plurality of second image frames, and is not affected by the unstable situation. Compared with the situation that different image frames are used when determining the first exposure sequence and when generating the HDR image by combining the multi-frame second image frames, the problem that the HDR imaging effect is poor because the exposure distance between the multi-frame second image frames and other image frames is overlarge and part of the image frames in the multi-frame second image frames are discarded, namely, all the second image frames are not used for generating the HDR image, and the multi-frame second image frames and the first image frames can be fused better can be avoided, so that the HDR imaging effect is better. Moreover, the method provided by the embodiment of the application can enable the HDR imaging effect to be good in various unstable scenes, and improves shooting stability.
The image processing method provided by the embodiment of the application can be applied to various electronic devices with shooting functions and in which an HDR mode is provided. The photographing function may take a photograph or a video. The electronic device may be, but is not limited to, a cell phone, tablet, desktop, laptop, handheld computer, notebook, in-vehicle device, ultra-mobile personal computer (UMPC), netbook, cellular telephone, personal digital assistant (personal digital assistant, PDA), augmented reality (augmented reality, AR) \virtual reality (VR) device, etc., as embodiments of the present application are not limited in this respect.
The following describes in detail the implementation manner provided by the examples of the present application with reference to the accompanying drawings. Fig. 2 is a schematic diagram illustrating a hardware structure of the electronic device 100 according to the embodiment of the present application.
The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It should be understood that the illustrated structure of the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively, through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, such that the processor 110 communicates with the touch sensor 180K through an I2C bus interface to implement a touch function of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the I2S interface, to implement a function of answering a call through the bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface to implement a function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through a UART interface, to implement a function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 110 to peripheral devices such as a display 194, a camera 193, and the like. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (display serial interface, DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the photographing functions of electronic device 100. The processor 110 and the display 194 communicate via a DSI interface to implement the display functionality of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may 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, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transfer data between the electronic device 100 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present invention is only illustrative, and is not meant to limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating 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. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., as applied to the electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The ISP is used to process data fed back by the camera 193. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred 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 the like format. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent awareness of the electronic device 100 may be implemented through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 100 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. The processor 110 performs various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, voice call, video call, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The electronic device 100 may listen to music, or to hands-free conversations, through the speaker 170A.
A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When electronic device 100 is answering a telephone call or voice message, voice may be received by placing receiver 170B in close proximity to the human ear.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 170C through the mouth, inputting a sound signal to the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four, or more microphones 170C to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be a USB interface 130 or a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. The capacitance between the electrodes changes when a force is applied to the pressure sensor 180A. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 may also calculate the location of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions. For example: and executing an instruction for checking the short message when the touch operation with the touch operation intensity smaller than the first pressure threshold acts on the short message application icon. And executing an instruction for newly creating the short message when the touch operation with the touch operation intensity being greater than or equal to the first pressure threshold acts on the short message application icon.
The gyro sensor 180B may be used to determine a motion gesture of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., x, y, and z axes) may be determined by gyro sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects the shake angle of the electronic device 100, calculates the distance to be compensated by the lens module according to the angle, and makes the lens counteract the shake of the electronic device 100 through the reverse motion, so as to realize anti-shake. The gyro sensor 180B may also be used for navigating, somatosensory game scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude from barometric pressure values measured by barometric pressure sensor 180C, aiding in positioning and navigation.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip cover using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the detected opening and closing state of the leather sheath or the opening and closing state of the flip, the characteristics of automatic unlocking of the flip and the like are set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the electronic device 100 is stationary. The electronic equipment gesture recognition method can also be used for recognizing the gesture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, the electronic device 100 may range using the distance sensor 180F to achieve quick focus.
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 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it may be determined that there is an object in the vicinity of the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there is no object in the vicinity of the electronic device 100. The electronic device 100 can detect that the user holds the electronic device 100 close to the ear by using the proximity light sensor 180G, so as to automatically extinguish the screen for the purpose of saving power. The proximity light sensor 180G may also be used in holster mode, pocket mode to automatically unlock and lock the screen.
The ambient light sensor 180L is used to sense ambient light level. The electronic device 100 may adaptively adjust the brightness of the display 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust white balance when taking a photograph. Ambient light sensor 180L may also cooperate with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent false touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 may utilize the collected fingerprint feature to unlock the fingerprint, access the application lock, photograph the fingerprint, answer the incoming call, etc.
The temperature sensor 180J is for detecting temperature. In some embodiments, the electronic device 100 performs a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 100 performs a reduction in the performance of a processor located in the vicinity of temperature sensor 180J in order to reduce power consumption to implement thermal protection. In other embodiments, when the temperature is below another threshold, the electronic device 100 heats the battery 142 to avoid the low temperature causing the electronic device 100 to be abnormally shut down. In other embodiments, when the temperature is below a further threshold, the electronic device 100 performs boosting of the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperatures.
The touch sensor 180K, also referred to as a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 at a different location than the display 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, bone conduction sensor 180M may acquire a vibration signal of a human vocal tract vibrating bone pieces. The bone conduction sensor 180M may also contact the pulse of the human body to receive the blood pressure pulsation signal. In some embodiments, bone conduction sensor 180M may also be provided in a headset, in combination with an osteoinductive headset. The audio module 170 may analyze the voice signal based on the vibration signal of the sound portion vibration bone block obtained by the bone conduction sensor 180M, so as to implement a voice function. The application processor may analyze the heart rate information based on the blood pressure beat signal acquired by the bone conduction sensor 180M, so as to implement a heart rate detection function.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The electronic device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects by touching different areas of the display screen 194. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195, or removed from the SIM card interface 195 to enable contact and separation with the electronic device 100. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support Nano SIM cards, micro SIM cards, and the like. The same SIM card interface 195 may be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, 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.
In the following embodiments, the method of the embodiments of the present application is described by taking the electronic device 100 as an example of a mobile phone. The software structure of the electronic device 100 is exemplified below by a layered Android system. Fig. 3 shows a software architecture block diagram of the electronic device 100 provided in an embodiment of the present application.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is an application layer, an application framework layer (Application Framework), a hardware abstraction layer (Hardware Abstract Layer, HAL), a kernel layer, and a hardware layer, respectively, from top to bottom. It should be understood that the embodiments of the present application take an Android system as an example, and the operator system of the electronic device may include, but is not limited to(Symbian)、/>(Andriod)、/>(iOS)、/>The operating system (Blackberry), hong (harmyos), etc., is not limited in any way, as long as the functions implemented by the respective functional modules are similar to those implemented by the embodiments of the present application.
An application having a photographing function, for example, a camera application, which provides an HDR mode, may be installed in the application layer. Of course, when other applications need to use the shooting function, the camera application may also be called to realize the shooting function.
Other applications of the application layer include, but are not limited to, applications such as music, gallery, calendar, short message, talk, navigation, video, etc.
The application framework layer may provide an application programming interface (applicationprogramming interface, API) and programming framework to the application of the application layer; the application framework layer may include some predefined functions.
For example, the application framework layer may include a camera access interface; camera management and camera devices may be included in the camera access interface; wherein camera management may be used to provide an access interface to manage the camera; the camera device may be used to provide an interface to access the camera.
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), which embodiments of the present application do not limit in any way.
The hardware abstraction layer is used for abstracting hardware. By calling the hardware abstraction layer interface in the hardware abstraction layer, the connection between the application program layer and the application frame layer above the hardware abstraction layer and the driving layer and the hardware layer below the hardware abstraction layer can be realized, and shooting data transmission and function control can be realized.
In this embodiment of the present application, the hardware abstraction layer may include a first hardware abstraction layer and a second hardware abstraction layer, where 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 and the like. The image management module is used for customizing flow management, and a manufacturer can customize functions according to requirements. The image processing module is used for interacting with the bottom layer driver, sending a picture command to the sensor driver according to the shooting command sent by the image management module, and also used for receiving an original image output by the sensor and carrying out image processing on the original image.
The smart ae packaging module is packaged in the perception engine, and can calculate exposure sequences by using different photographing methods (for example, photographing method 1 to photographing method 4) under different photographing scenes, wherein the scenes comprise daytime, night, landscape, portrait and the like, and for example, the photographing method 1 is used for calculating the exposure sequences required for generating the HDR images in the daytime. The perception engine further comprises a buffer queue, each original image frame output by the image sensor can be buffered in the buffer queue, for example, multiple frames of original image frames output by the image sensor in the process of buffer preview and shooting data of each frame of original image frame, wherein the shooting data comprises, but is not limited to, automatic Focusing (AF) statistical data, automatic Exposure (AE) statistical data, automatic White Balance (AWB) statistical data, angular speed, time stamp, contrast and the like, and the AE statistical data comprises, but is not limited to, exposure time, brightness of pixels, ISO sensitization value and the like. Where the time stamp refers to the time at which the original image frame was acquired.
The kernel layer is used for providing drivers for different hardware devices. For example, the drive layer may include a camera drive, a display drive, and a sensor drive.
The hardware layer may include a plurality of image sensors, a plurality of image signal processors, cameras, display screens, and other hardware devices.
The workflow of the electronic device 100 software and hardware is illustrated below in conjunction with fig. 3 and 4.
Taking a camera application as an example, when the camera application runs on the electronic device 100, the camera application calls an interface corresponding to the camera application in the application framework layer, then starts a camera driver by calling a hardware abstraction layer, starts a plurality of cameras 193 on the electronic device 100, acquires an original image through a target camera, processes the original image to obtain a preview image, and displays the preview image.
Under the condition that the HDR mode is started, a camera application of the application layer receives a shooting instruction, an interface corresponding to the camera application in the application framework layer is called to send the shooting instruction to the image management module, and the image management module calls the smartAE encapsulation module to calculate a variable exposure sequence (a second exposure sequence). Specifically, as shown in step (1) in fig. 4, the image management module transmits a shooting instruction to a shooting method base class of the second hardware abstraction layer through a connection module filterbridge between the first hardware abstraction layer and the second hardware abstraction layer, so as to schedule the smartAE encapsulation module to calculate. The smart ae encapsulation module calculates a variable exposure sequence (second exposure sequence) according to the photographing method corresponding to the current photographing scene and photographing data of the first reference frame, and returns the variable exposure sequence (second exposure sequence) to the image management module, as shown in steps (2) and (3) in fig. 4. The first reference frame may be the last frame image in the buffer queue when the smart ae receives the shooting instruction.
The frame selecting module in the image management module selects a second reference frame from the buffer queue according to shooting data of multiple frames of original image frames in the buffer queue and a variable exposure sequence (a second exposure sequence), and determines a timestamp of the second reference frame. The frame selection module encapsulates a frame selection algorithm, and the frame selection algorithm is merely a generic term for an algorithm capable of selecting a reference frame, which is not limited in the embodiment of the present application.
After determining the second reference frame, the image management module schedules the smartAE encapsulation module again for calculation, as shown in step (4) in fig. 4, and sends a request to the perception engine through filterbridge lmpl, requesting to schedule the smartAE encapsulation module for calculation, and carrying a timestamp of the second reference frame in the request. As shown in step (5) in fig. 4, after the filterbridge lmpl receives the request, an instance of a smart ae encapsulation module is acquired, shooting data of a second reference frame is acquired according to a timestamp of the second reference frame, at this time, the scene information is determined, and only the smart ae encapsulation module needs to be scheduled to recalculate a variable exposure sequence (a first exposure sequence) according to the shooting data of the second reference frame, and a result of the first exposure sequence is returned to the image management module, as shown in step (6) in fig. 4. Because the frame selection module is integrated in the first hardware abstraction layer, the perception engine and the smart AE 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, the variable exposure sequence is redetermined by scheduling the smart AE encapsulation module again, the modification quantity of the system is small, and the maintenance is easy.
The image management module transmits the first exposure sequence to the image processing module, the image processing module transmits the first exposure sequence to the sensor through the kernel layer, and the sensor sequentially outputs corresponding image frames according to the first exposure sequence and reports the corresponding image frames to the image processing module. The image processing module invokes an HDR algorithm to generate an HDR image from the corresponding image frame and the second reference frame.
Based on the technical scheme, the exposure sequence calculated for the first time belongs to pre-calculation, and the frame selection process can use the exposure sequence result calculated for the first time. And the exposure sequence result calculated for the second time is issued to the image sensor, so that the smartAE encapsulation module is ensured to calculate that the exposure sequence and the image processing module generate HDR images to use second reference frames, and therefore the exposure difference between N frames in the exposure sequence and the second reference frames is smaller, or the difference between the exposure amounts of S frames, L frames and the second reference frames in the exposure sequence meets the threshold requirement, and the problem that the HDR imaging effect is poor because the subsequent verification does not need to discard some image frames is avoided.
Fig. 5 is a schematic flowchart of an image processing method provided in an embodiment of the present application. The method may be performed by the electronic device shown in fig. 2, or by the various modules shown in fig. 3; the method includes steps S501 to S507, and steps S501 to S507 are described in detail below.
S501, the electronic device starts a shooting function and starts an HDR mode.
The electronic device may initiate a shooting function by running a camera application, for example, the user may instruct the electronic device to run the camera application by clicking an icon of the "camera" application; or when the electronic equipment is in the screen locking state, the user can instruct the electronic equipment to run the camera application through a gesture of sliding rightwards on the display screen of the electronic equipment. Or the electronic equipment is in a screen locking state, the screen locking interface comprises an icon of the camera application, and the user instructs the electronic equipment to run the camera application by clicking the icon of the camera application. Or when the electronic equipment runs other applications, the applications have the authority of calling the camera applications; the user may instruct the electronic device to run the camera application by clicking on the corresponding control. For example, when the electronic device is running an instant messaging application, the user may instruct the electronic device to run the camera application, etc., by selecting a control for the camera function.
It should be appreciated that the above is illustrative of the operation of running a camera application; the electronic device may also be instructed to run the camera application by voice, or otherwise; the present application is not limited in any way.
After running the camera application, the user can turn on the HDR mode of the photographing function according to the flow shown in fig. 1.
S502, the electronic equipment detects a shooting instruction, and the shooting instruction requests the electronic equipment to shoot.
After the HDR mode of the photographing function of the electronic device is turned on, the user may issue a photographing instruction requesting the electronic device to photograph in the HDR mode to acquire an HDR image. For example, the photographing instruction may be a click operation of a photographing control by a user, and the photographing control may be a photographing button 20 as shown in (d) of fig. 1. It should be understood that the electronic device may be triggered to take a photograph by a voice command, a gesture command, or the like, which is not limited in this application.
When the shooting instruction is a click operation of the shooting control by the user, the action of clicking the shooting control can be subdivided into two stages of pressing and lifting. In one implementation manner, when detecting the operation of pressing the shooting control by the user, the application layer can issue a shooting instruction to the HAL layer and perform subsequent procedures, and the processes of selecting frames, calculating an exposure sequence, outputting original image frames and the like are performed in the pressing and lifting process of clicking the shooting control, and in the lifting stage, the image sensor may already output a second image frame, so that the image processing method of the application can improve the shooting response speed.
In another implementation, when detecting the operation that the user presses the shooting control and lifts, the application layer issues a shooting instruction to the HAL layer, and performs a subsequent flow.
S503, the electronic device determines a second exposure sequence according to a third image frame in the multi-frame original image frames.
The multi-frame original image frames are buffered in a buffer queue in the preview process, shooting data of each frame of original image are also stored in the buffer, and the shooting data comprise AE statistical data. AE statistics may include image brightness, exposure parameters, etc. The exposure parameters may include exposure time, sensitivity, aperture coefficient, and the like.
The electronic device may determine the number of frames of the image frames to be captured to generate the HDR image, the exposure parameters of each image frame, and the frame out order according to AE statistics of a third image frame of the original image frames. And arranging the exposure parameters according to the frame-out sequence to generate a second exposure sequence. It should be appreciated that the second exposure sequence includes a plurality of sets of exposure parameters, at least two of the plurality of sets of exposure parameters having different values, such as different values of exposure time, different values of sensitivity, or different values of each of the plurality of sets of exposure parameters.
For example, taking the exposure time as an example, the electronic device may calculate the exposure time corresponding to the required long frame image, the middle frame image, and the short frame image according to the exposure time of the third image frame, and determine the number corresponding to the required long frame image, the middle frame image, and the short frame image, for example, when shooting the HDR image in the daytime scene, one frame of long frame image, one frame of middle frame image, two frames of short frame image, and the sequence of short frame image, middle frame image, short frame image, and long frame image are sequentially, where the exposure time is sequentially 5ms, 10ms, 5ms, and 50ms, and then the second exposure sequence may be represented as { S, N, S, L, s= 5,N =10, and s= 5,L =50 }.
Note that the third image frame is a mid-frame image. The third image frame corresponds to the first reference frame.
The buffer queue may be a ZSL queue, and when the camera application is in a preview state, the image sensor stores the acquired original image frames into the ZSL queue one by one according to a time sequence. When all storage bits in the ZSL queue are occupied, the ZSL queue replaces the history image frames in the ZSL queue one by utilizing the latest acquired original image frames in real time. Fig. 6 is a schematic structural diagram of a ZSL queue applicable to the embodiment of the present application. Referring to fig. 6, taking an example in which one ZSL queue includes 8 storage bits, the ZSL queue may simultaneously store up to 8 image frames. When the number of the image frames in the ZSL queue is smaller than 8, the image frames are sequentially stored in the ZSL queue from left to right according to a time sequence, namely, the first image frame output earliest is stored in a storage bit 1, and the second image frame is stored in a storage bit 2, so that the image frames are pushed; when the number of the image frames in the ZSL queue is equal to 8, if a ninth image frame is to be stored, the first image frame is deleted, the second image frame moves rightwards to the storage bit 1, the third image frame moves rightwards to the storage bit 2, and accordingly, the eighth image frame moves upwards to the storage bit 7, at the moment, the storage bit 8 is unoccupied, and the ninth image frame is stored in the storage bit 8.
It should be understood that the ZSL queue structure described above 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 herein. The above method for storing image frames in the ZSL queue is only an example, and the specific storage method is not limited herein.
In one example, the third image frame may be the last frame image in the buffer queue when the smart ae encapsulation module receives the capture instruction.
And S504, the electronic equipment determines a first image frame from the multi-frame original image frames according to the second exposure sequence and shooting data corresponding to the multi-frame original image frames.
It should be understood that, when a photographing instruction of a user is received from an upper application (a camera application as shown in fig. 1), it takes time (a delay period as shown in fig. 6) until a smart ae encapsulation module of the HAL layer receives the photographing instruction, during which time a Sensor may output a plurality of original image frames. For example, as shown in fig. 6, assume that when the Sensor outputs the 3 rd original image frame, the upper layer application receives a photographing instruction; when the Sensor outputs the 7 th frame of original image frame, the shooting instruction is transmitted to a smartAE encapsulation module of the HAL layer. Because of the delay time period shown in fig. 6, the 7 th frame image is not one frame image at the moment when the user issues the photographing instruction, and thus the 7 th frame image may not be one frame image that the user really wants, and the HDR image generated from the 7 th frame image may not be satisfactory to the user.
In this embodiment of the present invention, the electronic device or a frame selection module in the electronic device may determine, according to a frame sequence in the second exposure sequence, which shooting scene is currently shot, and then select, according to shooting data corresponding to a plurality of frames of original image frames, a first image frame from the plurality of frames of original image frames, and generate an HDR image based on the first image frame, where a timestamp corresponding to the first image frame is earlier than a timestamp corresponding to a third image frame. The original image frames which are closer to the time output by the user sending the shooting instruction are selected for generating the HDR image through selecting the frames, so that the effect of what you see is what you get can be achieved, and the user experience is improved.
The frame selection algorithm is only a generic term for an algorithm capable of selecting a reference frame, and the specific algorithm is not limited in this embodiment of the present application.
For example, an image frame having the smallest angular velocity may be selected as the first image frame from among the plurality of frames of original image frames. Wherein the angular velocity may be acquired by a gyro sensor. The smaller the angular velocity, the smaller the shake when the image sensor collects the original image frame, and the larger the angular velocity, the larger the shake when the image sensor collects the original image frame. The image quality of the first image frame thus selected is better.
For example, an image frame with a low exposure amount may be selected as the first image frame from a plurality of frames of original image frames according to the exposure time. The lower exposure can keep more details, so that the selected first image frame has more details, and the HDR image with higher quality is generated by being fused with other image frames.
For example, an image frame whose time stamp is closest to the time when the user issues the photographing instruction may be selected as the first image frame from among the plurality of frames of original image frames.
The first image frame is a mid-frame image. The first image frame corresponds to the aforementioned second reference frame.
S505, the electronic device determines a first exposure sequence according to the first image frame.
The electronic equipment redetermines the number of frames of the image frames required to be shot for generating the HDR image according to the AE statistical data of the first image frame in the multi-frame original image frames, the exposure parameters of each image frame and the frame outputting sequence. And arranging the exposure parameters according to the frame-out sequence to generate a first exposure sequence.
For example, the electronic device may calculate exposure times corresponding to the long frame image, the middle frame image, and the short frame image, respectively, according to the exposure times of the first image frame, and determine the number of the long frame image, the middle frame image, and the short frame image, respectively, that are required.
It should be appreciated that the first exposure sequence includes a plurality of sets of exposure parameters, and the parameters in one set of exposure parameters may include exposure time, sensitivity, aperture coefficient, etc., and that at least two of the plurality of sets of exposure parameters may have different values, such as different values for exposure time, different values for sensitivity, or different values for each of the plurality of sets of exposure parameters.
It will be appreciated that the length frames, frame out order, exposure parameters in the first exposure sequence may be different for different shot scenes, such as daytime and night time scenes.
S506, the electronic equipment sequentially acquires a plurality of frames of second image frames according to the first exposure sequence.
The method comprises the steps that an electronic device or a module of a HAL layer of the electronic device transmits a first exposure sequence to an image sensor, and the image sensor sequentially outputs second image frames according to a frame output sequence and exposure parameters corresponding to each frame, wherein the second image frames correspond to the exposure parameters one by one.
S507, the electronic device generates a high dynamic range image according to the multi-frame second image frame and the first image frame.
In the embodiment of the application, the first image frame is taken as a reference, and the multi-frame second image frame is fused into the first image frame through the exposure fusion algorithm, so that a dark area in the image frame is lightened by long exposure, a bright area is restored by short exposure, an HDR image is generated, and the whole HDR image is bright and dark.
In another implementation, fig. 7 is a schematic flowchart of another image processing method provided in an embodiment of the present application. The method may be performed by the electronic device shown in fig. 2, or by the various modules shown in fig. 3; the method includes steps S701 to S706, and steps S701 to S706 are described in detail below, respectively.
S701, the electronic device starts a shooting function and starts an HDR mode.
The electronic device may initiate a shooting function by running a camera application, for example, the user may instruct the electronic device to run the camera application by clicking an icon of the "camera" application; or when the electronic equipment is in the screen locking state, the user can instruct the electronic equipment to run the camera application through a gesture of sliding rightwards on the display screen of the electronic equipment. Or the electronic equipment is in a screen locking state, the screen locking interface comprises an icon of the camera application, and the user instructs the electronic equipment to run the camera application by clicking the icon of the camera application. Or when the electronic equipment runs other applications, the applications have the authority of calling the camera applications; the user may instruct the electronic device to run the camera application by clicking on the corresponding control. For example, when the electronic device is running an instant messaging application, the user may instruct the electronic device to run the camera application, etc., by selecting a control for the camera function.
It should be appreciated that the above is illustrative of the operation of running a camera application; the electronic device may also be instructed to run the camera application by voice, or otherwise; the present application is not limited in any way.
After running the camera application, the user can turn on the HDR mode of the photographing function according to the flow shown in fig. 1.
S702, the electronic equipment detects a shooting instruction, and the shooting instruction requests the electronic equipment to shoot.
After the HDR mode of the photographing function of the electronic device is turned on, the user may issue a photographing instruction requesting the electronic device to photograph in the HDR mode to acquire an HDR image. For example, the photographing instruction may be a click operation of a photographing control by a user, and the photographing control may be a photographing button 20 as shown in (d) of fig. 1. It should be understood that the electronic device may be triggered to take a photograph by a voice command, a gesture command, or the like, which is not limited in this application.
When the shooting instruction is a click operation of the shooting control by the user, the action of clicking the shooting control can be subdivided into two stages of pressing and lifting. In one implementation manner, when detecting the operation of pressing the shooting control by the user, the application layer can issue a shooting instruction to the HAL layer and perform subsequent procedures, and the processes of selecting frames, calculating an exposure sequence, outputting original image frames and the like are performed in the pressing and lifting process of clicking the shooting control, and in the lifting stage, the image sensor may already output a second image frame, so that the image processing method of the application can improve the shooting response speed.
In another implementation, when detecting the operation that the user presses the shooting control and lifts, the application layer issues a shooting instruction to the HAL layer, and performs a subsequent flow.
S703, the electronic device determines a first image frame from the multiple frames of original image frames acquired in the preview process.
In this embodiment of the present application, the multiple frames of original image frames acquired in the preview process may be cached in the foregoing ZLS queue. The captured data of each original image frame may also be cached when cached.
The electronic equipment or a frame selection module in the electronic equipment selects a first image frame from the multi-frame original image frames according to shooting data corresponding to the multi-frame original image frames, and generates an HDR image based on the first image frame. The original image frames which are closer to the time output by the user triggering the shooting instruction are selected by selecting frames to generate the HDR image, so that the effect of what you see is what you get can be achieved, and the user experience is improved.
For example, an image frame having the smallest angular velocity may be selected as the first image frame from among the plurality of frames of original image frames. Wherein the angular velocity may be acquired by a gyro sensor. The smaller the angular velocity, the smaller the shake when the image sensor collects the original image frame, and the larger the angular velocity, the larger the shake when the image sensor collects the original image frame. The image quality of the first image frame thus selected is better.
For example, an image frame with a low exposure amount may be selected as the first image frame from a plurality of frames of original image frames according to the exposure time.
For example, an image frame whose time stamp is closest to the time when the user issues the photographing instruction may be selected from among the multi-frame images as the first image frame.
Illustratively, the first image frame may be selected in combination with the angular velocity, exposure time, and time stamp described above.
S704, the electronic device determines a first exposure sequence according to the first image frame.
The electronic equipment redetermines the number of frames of the image frames required to be shot for generating the HDR image according to the AE statistical data of the first image frame in the multi-frame original image frames, the exposure parameters of each image frame and the frame outputting sequence. And arranging the exposure parameters according to the frame-out sequence to generate a first exposure sequence.
It should be appreciated that the first exposure sequence includes a plurality of sets of exposure parameters, and the parameters in one set of exposure parameters may include exposure time, sensitivity, aperture coefficient, etc., and that at least two of the plurality of sets of exposure parameters may have different values, such as different values for exposure time, different values for sensitivity, or different values for each of the plurality of sets of exposure parameters. Thus, the exposure amounts of at least two frames in the outputted multi-frame images are different.
It will be appreciated that the length frames, frame out order, exposure parameters in the first exposure sequence may be different for different shot scenes, such as daytime and night time scenes. According to the embodiment of the application, according to a shooting scene algorithm in a shooting method base class, which shooting scene is currently shot is determined, and then a first exposure sequence is determined according to the shooting scene and a first image frame.
For example, taking exposure time as an example, the electronic device calculates exposure times corresponding to the required long frame image, the middle frame image and the short frame image according to the exposure time of the first image frame, and determines the number corresponding to the required long frame image, the middle frame image and the short frame image respectively, for example, when shooting the HDR image in a daytime scene, one frame of long frame image, one frame of middle frame image and two frames of short frame image are needed, the short frame image, the middle frame image, the short frame image and the long frame image are sequentially arranged, the exposure times are sequentially arranged to be 5ms, 10ms, 5ms and 50ms, and then the first exposure sequence can be expressed as { S, N, S, L, s= 5,N =10, s= 5,L =50 }.
And S705, the electronic equipment sequentially acquires a plurality of frames of second image frames according to the first exposure sequence.
The method comprises the steps that an electronic device or a module of a HAL layer of the electronic device transmits a first exposure sequence to an image sensor, and the image sensor sequentially outputs second image frames according to a frame output sequence and exposure parameters corresponding to each frame, wherein one frame of the second image frames corresponds to one group of exposure parameters one by one.
S706, the electronic device generates a high dynamic range image according to the multi-frame second image frame and the first image frame.
In the embodiment of the application, the first image frame is taken as a reference, and the multi-frame second image frame is fused into the first image frame through the exposure fusion algorithm, so that a dark area in the image frame is lightened by long exposure, a bright area is restored by short exposure, an HDR image is generated, and the whole HDR image is bright and dark.
Based on the above-described technical solution, when generating an HDR image from a first image frame and a plurality of frames of second image frames, since the plurality of frames of second image frames are generated from a first exposure sequence in which exposure parameters are used to determine the exposure amount of the second image frames, and the first exposure sequence is determined from the first image frames, that is, the same image frame (that is, the first image frame) is used when determining the first exposure sequence and when generating the HDR image in combination with the plurality of frames of second image frames, the difference between the exposure amount of the plurality of frames of second image frames and the exposure amount of the first image frame is small.
Compared with the situation that different image frames are used when determining the first exposure sequence and when generating the HDR image by combining the multi-frame second image frames, for example, the first image frame is used when calculating the first exposure sequence, and the multi-frame second image frame and other image frames are used when generating the HDR image, the difference between the exposure amounts of the first image frame and the other image frames under the unstable condition can be larger, and the first image frames are used in the application, so that the influence of the unstable condition is avoided, the problem that the HDR imaging effect is poor due to the fact that part of the image frames in the multi-frame second image frame are discarded due to the fact that the exposure amount difference between the multi-frame second image frame and the other image frames is too large in the process of generating the HDR image, namely, all the second image frames are not used for generating the HDR image, can be solved, and the method provided by the embodiment of the application can display good HDR imaging effect under various unstable conditions, and improve shooting stability.
The image processing method provided by the embodiment of the present application is described in detail above with reference to fig. 1 to 7, and the embodiment of the apparatus of the present application is described below with reference to fig. 8. It should be understood that the apparatus in the embodiments of the present application may perform the methods in the embodiments of the present application, that is, specific working procedures of the following various products may refer to corresponding procedures in the embodiments of the methods.
Fig. 8 is a schematic diagram of an apparatus of an electronic device according to an embodiment of the present application. The apparatus 800 includes a detection module 810 and a processing module 820.
The detection module 810 is configured to detect a shooting instruction, where the shooting instruction requests the electronic device to perform shooting, and the high dynamic range HDR mode of the shooting function of the electronic device is turned on when the shooting instruction is detected. The processing module 820 is configured to determine, in response to a shooting instruction, a first image frame from multiple frames of original image frames buffered in a preview process, and determine a first exposure sequence according to the first image frame, where the first exposure sequence includes multiple sets of exposure parameters, and values of at least two sets of exposure parameters in the multiple sets of exposure parameters are different; sequentially acquiring a plurality of frames of second image frames according to the first exposure sequence, wherein the second image frames correspond to a plurality of groups of exposure parameters; a high dynamic range image is generated from the multi-frame second image frame and the first image frame.
The apparatus 800 further comprises a storage module 830 (not shown in the figure), where the storage module 830 is configured to store the multiple frames of original image frames buffered during the preview process, and the captured data of each original image frame.
Wherein the photographing data may include one or more of the following: angular velocity, exposure time, time stamp. The exposure parameters may include exposure time and sensitivity.
Optionally, as an embodiment, the processing module 820 is specifically configured to: determining a second exposure sequence according to a third image frame in the multi-frame original image frames; and determining a first image frame from the multi-frame original image frames according to the second exposure sequence and shooting data corresponding to the multi-frame original image frames, wherein the time stamp corresponding to the first image frame is earlier than the time stamp corresponding to the third image frame.
Alternatively, as an embodiment, the third image frame is the last frame of the original image frames of the plurality of frames corresponding to when the photographing instruction is detected.
Optionally, as an embodiment, the processing module 820 is specifically further configured to: the first image frame is determined from the original image frames of the plurality of frames according to the timing at which the photographing instruction is detected.
The first image frame is a middle exposure image frame, and the first exposure sequence comprises at least two corresponding exposure parameters of a long exposure image frame, a middle exposure image frame and a short exposure image frame, wherein the exposure time of the long exposure image frame is longer than that of the middle exposure image frame, and the exposure time of the middle exposure image frame is longer than that of the short exposure image frame.
Optionally, as an embodiment, the shooting instruction includes a first operation, where the first operation is an operation that a user presses a shooting control of a shooting function in the electronic device.
The electronic device is embodied in the form of a functional module. The term "module" herein may be implemented in software and/or hardware, and is not specifically limited thereto.
Embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements steps that may implement the various method embodiments described above.
Embodiments of the present application provide a computer program product which, when run on a mobile terminal, causes an electronic device to perform steps that may be implemented in the various method embodiments described above.
In addition, embodiments of the present application also provide an apparatus, which may be specifically a chip, a component, or a module, and may include a processor and a memory connected to each other; the memory is configured to store computer-executable instructions, and when the device is operated, the processor may execute the computer-executable instructions stored in the memory, so that the chip performs the methods in the above method embodiments. The chip may be implemented using the following circuits or devices: one or more field programmable gate arrays (field programmable gate array, FPGA), programmable logic devices (programmable logic device, PLD), controllers, state machines, gate logic, discrete hardware components, any other suitable circuit or combination of circuits capable of performing the various functions described throughout this application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/electronic device and method may be implemented in other manners. For example, the apparatus/electronic device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The electronic device provided in this embodiment is configured to perform the above method, so that the same effects as those of the implementation method can be achieved. In case an integrated unit is employed, the electronic device may comprise a processing module, a storage module and a communication module. The processing module may be configured to control and manage actions of the electronic device, for example, may be configured to support the electronic device to execute steps executed by the processing unit. The memory module may be used to support the electronic device to execute stored program code, data, etc. And the communication module can be used for supporting the communication between the electronic device and other devices.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the flow in the methods of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, where the computer program may implement the steps of each method embodiment described above when executed by a processor. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing device/terminal apparatus, recording medium, computer memory, read-only memory (ROM), random access memory (random access memory, RAM), electrical carrier signals, telecommunications signals, and software distribution media. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of 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.
In the description above, for purposes of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that reference to "a plurality" in this specification and the appended claims refers to two or more. In the description of the present application, "/" means or, unless otherwise indicated, for example, a/B may represent a or B; "and/or" herein is merely an association describing an associated object, and refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations, e.g., a and/or B, which may represent: a exists alone, A and B exist together, and B exists alone.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
In addition, for the purpose of facilitating the clear description of the technical solutions of the present application, the words "first", "second", etc. are used to distinguish between the same item or similar items having substantially the same function and effect. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, are not to be construed as indicating or implying any particular importance, and that the words "first," "second," and the like do not necessarily differ.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.
Claims (10)
1. An image processing method, applied to an electronic device, comprising:
detecting a shooting instruction, wherein the shooting instruction requests the electronic equipment to shoot, and the high dynamic range HDR mode of a shooting function of the electronic equipment is started;
responding to the shooting instruction, and determining a first image frame from multiple frames of original image frames cached in the preview process;
determining a first exposure sequence according to the first image frame, wherein the first exposure sequence comprises a plurality of groups of exposure parameters, and values of at least two groups of exposure parameters in the plurality of groups of exposure parameters are different;
sequentially acquiring a plurality of frames of second image frames according to the first exposure sequence, wherein the second image frames correspond to the plurality of groups of exposure parameters;
and generating a high dynamic range image according to the multi-frame second image frame and the first image frame.
2. The method of claim 1, wherein determining the first image frame from the plurality of frames of the original image frames buffered during the preview comprises:
determining a second exposure sequence according to a third image frame in the multi-frame original image frames;
and determining the first image frame from the multi-frame original image frames according to the second exposure sequence and shooting data corresponding to the multi-frame original image frames, wherein the time stamp corresponding to the first image frame is earlier than the time stamp corresponding to the third image frame.
3. The method of claim 2, wherein the third image frame is a last frame of the plurality of frames of original image frames corresponding to when the photographing instruction is detected.
4. A method according to claim 2 or 3, wherein the shot data comprises one or more of the following: angular velocity, exposure time, a time stamp, wherein the time stamp is the time when the original image frame was acquired.
5. The method of claim 1, wherein determining the first image frame from the plurality of frames of the original image frames buffered during the preview comprises:
and determining the first image frame from the multi-frame original image frames according to the moment when the shooting instruction is detected.
6. The method of any one of claims 1 to 5, wherein the exposure parameters include at least one of exposure time and sensitivity.
7. The method of claim 6, wherein the first image frame is a mid-exposure image frame, and the first exposure sequence includes at least two corresponding exposure parameters of a long-exposure image frame, a mid-exposure image frame, and a short-exposure image frame, wherein an exposure time of the long-exposure image frame is greater than an exposure time of the mid-exposure image frame, and an exposure time of the mid-exposure image frame is greater than an exposure time of the short-exposure image frame.
8. The method according to any one of claims 1 to 7, wherein the photographing instruction includes a first operation, the first operation being an operation in which a user presses a photographing control of the photographing function of the electronic device.
9. An electronic device, comprising: one or more processors; one or more memories; the memory stores one or more programs that, when executed by the processor, cause the electronic device to perform the method of any of claims 1-8.
10. A computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the method of any of claims 1 to 8.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310970674.3A CN117714835B (en) | 2023-08-02 | 2023-08-02 | Image processing method, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310970674.3A CN117714835B (en) | 2023-08-02 | 2023-08-02 | Image processing method, electronic equipment and readable storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN117714835A true CN117714835A (en) | 2024-03-15 |
| CN117714835B CN117714835B (en) | 2024-09-06 |
Family
ID=90153964
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310970674.3A Active CN117714835B (en) | 2023-08-02 | 2023-08-02 | Image processing method, electronic equipment and readable storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN117714835B (en) |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2014060578A (en) * | 2012-09-18 | 2014-04-03 | Olympus Imaging Corp | Image pick-up device |
| CN107809593A (en) * | 2017-11-13 | 2018-03-16 | 广东欧珀移动通信有限公司 | Method, device, terminal and storage medium for capturing images |
| CN108337445A (en) * | 2018-03-26 | 2018-07-27 | 华为技术有限公司 | Photographic method, relevant device and computer storage media |
| US20190138259A1 (en) * | 2017-11-03 | 2019-05-09 | Qualcomm Incorporated | Systems and methods for high-dynamic range imaging |
| CN109743506A (en) * | 2018-12-14 | 2019-05-10 | 维沃移动通信有限公司 | A kind of image capturing method and terminal device |
| CN111402135A (en) * | 2020-03-17 | 2020-07-10 | Oppo广东移动通信有限公司 | Image processing method, image processing device, electronic equipment and computer readable storage medium |
| WO2020207387A1 (en) * | 2019-04-09 | 2020-10-15 | Oppo广东移动通信有限公司 | Image processing method and apparatus, storage medium, and electronic device |
| US11151702B1 (en) * | 2019-09-09 | 2021-10-19 | Apple Inc. | Deep learning-based image fusion for noise reduction and high dynamic range |
| CN115205172A (en) * | 2022-05-23 | 2022-10-18 | 深圳市慧鲤科技有限公司 | Image processing method and device, electronic equipment and storage medium |
-
2023
- 2023-08-02 CN CN202310970674.3A patent/CN117714835B/en active Active
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2014060578A (en) * | 2012-09-18 | 2014-04-03 | Olympus Imaging Corp | Image pick-up device |
| US20190138259A1 (en) * | 2017-11-03 | 2019-05-09 | Qualcomm Incorporated | Systems and methods for high-dynamic range imaging |
| CN107809593A (en) * | 2017-11-13 | 2018-03-16 | 广东欧珀移动通信有限公司 | Method, device, terminal and storage medium for capturing images |
| CN108337445A (en) * | 2018-03-26 | 2018-07-27 | 华为技术有限公司 | Photographic method, relevant device and computer storage media |
| CN109743506A (en) * | 2018-12-14 | 2019-05-10 | 维沃移动通信有限公司 | A kind of image capturing method and terminal device |
| WO2020207387A1 (en) * | 2019-04-09 | 2020-10-15 | Oppo广东移动通信有限公司 | Image processing method and apparatus, storage medium, and electronic device |
| US11151702B1 (en) * | 2019-09-09 | 2021-10-19 | Apple Inc. | Deep learning-based image fusion for noise reduction and high dynamic range |
| CN111402135A (en) * | 2020-03-17 | 2020-07-10 | Oppo广东移动通信有限公司 | Image processing method, image processing device, electronic equipment and computer readable storage medium |
| CN115205172A (en) * | 2022-05-23 | 2022-10-18 | 深圳市慧鲤科技有限公司 | Image processing method and device, electronic equipment and storage medium |
Non-Patent Citations (1)
| Title |
|---|
| 付争方 等: "多尺度细节融合的多曝光高动态图像重建", 计算机工程与应用, no. 24, 8 April 2018 (2018-04-08), pages 187 - 192 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN117714835B (en) | 2024-09-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112532859B (en) | Video acquisition method and electronic equipment | |
| KR102577396B1 (en) | Recording frame rate control method and related devices | |
| EP3893491A1 (en) | Method for photographing the moon and electronic device | |
| WO2021052232A1 (en) | Time-lapse photography method and device | |
| CN113810600B (en) | Image processing method, device and terminal device for terminal | |
| WO2020073959A1 (en) | Image capturing method, and electronic device | |
| CN112532892B (en) | Image processing method and electronic device | |
| CN115967851B (en) | Fast photographing method, electronic device and computer-readable storage medium | |
| CN113448482B (en) | Touch screen sliding response control method and device, and electronic device | |
| CN112492193A (en) | Method and equipment for processing callback stream | |
| CN114079725B (en) | Video anti-shake method, terminal device and computer-readable storage medium | |
| CN114863494A (en) | Screen brightness adjusting method and device and terminal equipment | |
| CN113572948B (en) | Video processing method and video processing device | |
| CN115706869B (en) | Terminal image processing method, device and terminal equipment | |
| CN117724863A (en) | Target signal processing method and electronic device | |
| CN116389884B (en) | Thumbnail display method and terminal equipment | |
| CN116582743B (en) | Shooting method, electronic equipment and medium | |
| CN117714835B (en) | Image processing method, electronic equipment and readable storage medium | |
| CN115412678A (en) | Exposure processing method and device and electronic equipment | |
| CN117593236A (en) | Image display method, device and terminal equipment | |
| CN117729420B (en) | Continuous shooting method and electronic equipment | |
| CN119299586B (en) | Image processing method, electronic device and readable storage medium | |
| CN116017138B (en) | Light measuring control display method, computer equipment and storage medium | |
| CN116233599B (en) | Video recording mode recommendation method and electronic device | |
| CN118450241B (en) | Image processing method and related device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CP03 | Change of name, title or address |
Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee after: Honor Terminal Co.,Ltd. Country or region after: China Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Patentee before: Honor Device Co.,Ltd. Country or region before: China |
|
| CP03 | Change of name, title or address |