Shooting method and device, electronic equipment and readable storage medium
By alternately outputting long and short frames, and grabbing multiple frame target frames containing underexposed frames, the ghosting and dragging problems caused by subject movement in high dynamic range imaging technology are solved, and the dynamic range and details of the image are improved. Improved shooting effect.
Patent Information
- Application Number
- CN202310877117.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-17
- Publication Date
- 2025-01-17
AI Technical Summary
When shooting with high dynamic range imaging technology, the movement of the subject leads to ghosting or dragging, resulting in low image clarity and poor display effect.
By alternately outputting long and short frames, the short frames are normal exposure frames or underexposure frames, and multiple target frames containing underexposure frames are captured to obtain images with clear subjects and high contrast, improving the dynamic range and details of the image.
It realizes that while avoiding ghosting and dragging, the dynamic range and details of the image are improved and the shooting effect is improved.
Smart Images

Figure CN119325032A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of camera technology, and specifically relates to a shooting method, device, electronic device and readable storage medium. Background Art
[0002] At present, when electronic devices are taking pictures, in order to obtain images with greater contrast between light and dark, High Dynamic Range Imaging (HDR) is usually turned on. The images captured by backward frame capture are processed by HDR to improve the image display effect. This makes the captured images have a larger exposure dynamic range, thereby improving the image display effect.
[0003] However, in the process of shooting using HDR technology, the movement of the subject may cause ghosting or smearing in the image captured by backward frame grabbing, resulting in low clarity of the subject in the captured image, and further resulting in poor display effect of the captured image. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a shooting method, device, electronic device and readable storage medium, which can improve the display effect of the image obtained by shooting.
[0005] In a first aspect, an embodiment of the present application provides a shooting method, the method comprising: outputting a first group of frames and a second group of frames, the first group of frames comprising M long frames, the second group of frames comprising M short frames, the long frames and the short frames being output alternately, the short frames being normal exposure frames or underexposed frames, and the M short frames comprising normal exposure frames and underexposed frames; receiving a user's shooting input; in response to the shooting input, capturing N target frames; based on the N target frames, obtaining a target image; wherein the N target frames include a first underexposed frame, the output time of the first underexposed frame is closest to the input time of the shooting input, and M and N are integers greater than 1.
[0006] In a second aspect, an embodiment of the present application provides a shooting device, which includes: an output module, a receiving module, a shooting module and a processing module; the output module is used to output a first group of frames and a second group of frames, the first group of frames includes M long frames, the second group of frames includes M short frames, the long frames and the short frames are output alternately, the short frames are normally exposed frames or underexposed frames, and the M short frames include normally exposed frames and underexposed frames; the receiving module is used to receive a shooting input; the shooting module is used to capture N target frames output by the output module in response to the shooting input received by the receiving module; the processing module is used to obtain a target image based on the N target frames captured by the shooting module; wherein the N target frames include a first underexposed frame, the output time of the first underexposed frame is closest to the input time of the shooting input, and M and N are integers greater than 1.
[0007] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0008] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0009] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0010] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0011] In the embodiment of the present application, a first group of frames and a second group of frames are output, the first group of frames includes M long frames, the second group of frames includes M short frames, the long frames and the short frames are output alternately, the short frames are normal exposure frames or underexposed frames, and the M short frames include normal exposure frames and underexposed frames; receiving a user's shooting input; in response to the shooting input, capturing N target frames; based on the N target frames, obtaining a target image; wherein the N target frames include a first underexposed frame, the output time of the first underexposed frame is closest to the input time of the shooting input, and M and N are integers greater than 1. Through this scheme, since the output frames can be divided into long frames and short frames, and the output short frames can be divided into normal exposure frames or underexposed frames, when shooting, by capturing multiple target frames including underexposed frames, the electronic device can capture images under multiple exposure frame combinations, so that a target image with a clear subject and high contrast can be obtained based on the captured image, and then the captured image can have more dynamic range and image details, thereby improving the display effect of the image. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 This is one of the flow charts of a shooting method provided in an embodiment of the present application;
[0013] Figure 2 This is a schematic diagram of an example of an electronic device outputting a first set of frames and a second set of frames provided by an embodiment of the present application;
[0014] Figure 3 This is a schematic diagram of an example of an electronic device outputting a first set of frames and a second set of frames provided by an embodiment of the present application;
[0015] Figure 4 This is the second flowchart of a shooting method provided in an embodiment of the present application;
[0016] Figure 5 It is a schematic diagram of an example of an electronic device capturing 6 target frames provided by an embodiment of the present application;
[0017] Figure 6 It is a schematic diagram of an example of an electronic device capturing 4 target frames provided by an embodiment of the present application;
[0018] Figure 7 This is the third flowchart of a shooting method provided in an embodiment of the present application;
[0019] Figure 8 It is a schematic diagram of an example of an electronic device provided in an embodiment of the present application performing noise reduction and synthesis on images corresponding to 6 captured target frames;
[0020] Fig. 9 This is a fourth flowchart of a shooting method provided in an embodiment of the present application;
[0021] Fig.10 It is a schematic diagram of an example of an electronic device provided in an embodiment of the present application performing noise reduction and synthesis on images corresponding to 8 captured target frames;
[0022] Fig.11 is an example flow chart of a shooting method provided in an embodiment of the present application;
[0023] Fig.12 is a structural schematic diagram of a photographing device provided in an embodiment of the present application;
[0024] Fig.13 This is one of the hardware structure diagrams of an electronic device provided in an embodiment of the present application;
[0025] Fig.14 This is the second schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0027] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0028] The following, in conjunction with the accompanying drawings, describes in detail the shooting method, device, electronic device and readable storage medium provided by the embodiments of the present application through specific embodiments and their application scenarios.
[0029] The shooting method, device, electronic device and readable storage medium provided in the embodiments of the present application are suitable for scenes of shooting images.
[0030] At present, when electronic devices shoot images, HDR is usually turned on, and the image is processed by backward frame capture through HDR, so that the captured image has a larger exposure dynamic range. Therefore, HDR is suitable for scenes with relatively stable images and large light and dark contrast.
[0031] In order to obtain a better freeze-frame effect, especially when shooting dynamic scenes and moving objects, HDR is usually turned off, and appropriate exposure settings are selected or professional sports photography equipment is used to capture the moment when the subject is moving, thereby avoiding ghosting, smearing and other effects. Therefore, HDR should usually be turned off for dynamic scenes and scenes of shooting moving objects. In this way, when shooting, the image obtained cannot ensure a good HDR effect while avoiding the generation of smearing and ghosting, resulting in poor display effect of the image obtained.
[0032] In the related art, although the dynamic range of an image can be improved by using a short frame to reduce exposure to retain the details of the bright area, and then using a tone mapping algorithm to increase the brightness of the image, this method actually results in a loss of grayscale contrast of the image, and increasing the brightness of the image will cause high noise and loss of clarity in the image. Therefore, the display effect of the image obtained by using a short frame to reduce exposure and increasing the brightness of the image through tone mapping is also poor.
[0033] In the shooting method, device, electronic device and readable storage medium provided in the embodiments of the present application, since the output frames can be divided into long frames and short frames, and the output short frames can be divided into normal exposure frames or underexposed frames, it is possible to capture multiple target frames including underexposed frames during shooting, so that the electronic device can capture images under a variety of exposure frame combinations, thereby obtaining a target image with a clear subject and high contrast based on the captured image, and further allowing the captured image to have more dynamic range and image details, thereby improving the image display effect.
[0034] The execution subject of the shooting method provided in the embodiment of the present application may be a shooting device. Exemplarily, the shooting device may be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The shooting method provided in the embodiment of the present application will be exemplarily described below by taking an electronic device as an example.
[0035] The present application embodiment provides a shooting method. Figure 1 FIG. 1 is a flowchart of a shooting method provided by an embodiment of the present application, which can be applied to electronic devices. Figure 1 As shown, the shooting method provided in the embodiment of the present application may include the following steps 101 to 104.
[0036] Step 101: An electronic device outputs a first set of frames and a second set of frames.
[0037] Among them, the first group of frames includes M long frames, and the second group of frames includes M short frames. The long frames and the short frames are output alternately. The short frames are normally exposed frames or underexposed frames. The M short frames include normally exposed frames and underexposed frames. M is an integer greater than 1.
[0038] In some embodiments of the present application, the electronic device can set the exposure of the frame by setting the length of the exposure time. The long frame can be an exposure frame with an exposure time greater than the first exposure time; the short frame can be an exposure frame with an exposure time less than the second exposure time.
[0039] In some embodiments of the present application, the first exposure time and the second exposure time may be set by the user, or may be set by default by the electronic device, or may be determined based on big data. The embodiments of the present application are not specifically limited.
[0040] It should be noted that the first exposure time is greater than or equal to the second exposure time.
[0041] In some embodiments of the present application, the long frame may be a frame having an exposure time longer than that of a normal exposure frame; and the under-exposed frame may be a frame having an exposure time shorter than that of a normal exposure frame.
[0042] For example, the electronic device may set the exposure time of the long frame to 20 ms, the exposure time of the normal exposure frame to 10 ms, and the exposure time of the under-exposure frame to 5 ms. In this way, the exposure of the frame is reduced by reducing the exposure time of the frame.
[0043] In some embodiments of the present application, the electronic device may also set the exposure of the frame by setting the gain of the photosensitive element.
[0044] In actual implementation, the electronic device may also set the exposure of the frame in other different ways, which is not specifically limited in the embodiments of the present application.
[0045] In some embodiments of the present application, the exposure of the long frame is the same as the exposure of the normal exposure frame, and the exposure of the underexposed frame is less than the exposure of the normal exposure frame. It can be understood that the exposure value (EV) can indicate the gain of the photosensitive element in the electronic device and the length of time.
[0046] In some embodiments of the present application, since the exposure degree can be determined by the exposure time and the gain of the photosensitive element of the electronic device, the exposure degree can be controlled by controlling the gain of the photosensitive element.
[0047] Exemplarily, the exposure time of the long frame is a, and the gain is b; the exposure time of the normal exposure frame is c, and the gain is d; the exposure time of the underexposed frame is e, and the gain is f. It can be understood that a is greater than b, and a is greater than e; d is greater than b, and f is greater than b. Since the exposure of the long frame is the same as that of the normal exposure frame, the product of the exposure time a and the gain b of the long frame is the same as the product of the exposure time c and the gain d of the normal exposure frame. In addition, since the exposure of the underexposed frame is less than that of the normal exposure frame, the product of the exposure time e and the gain f of the underexposed frame is less than the product of the exposure time c and the gain d of the normal exposure frame.
[0048] For example, assuming that the exposure of the long frame is EV0, the exposure of the normal exposure frame can be EV0, indicating that the exposure of the long frame is the same as that of the normal exposure frame; the exposure of the underexposed frame can be EV-, indicating that the exposure of the normal exposure frame can be twice that of the underexposed frame.
[0049] For example, assuming that the exposure of the long frame is EV0, the exposure of the normal exposure frame can be EV0, indicating that the exposure of the long frame is the same as that of the normal exposure frame; the exposure of the underexposed frame can be EV-, indicating that the exposure of the normal exposure frame can be four times that of the underexposed frame.
[0050] It is understandable that, since long frames and short frames are output alternately, the electronic device outputs the first set of frames and the second set of frames in the order that the long frames in the first set of frames and the short frames in the second set of frames are actually output alternately.
[0051] Exemplarily, assuming that the first group of frames includes long frame 1, long frame 2 and long frame 3, and the second group of frames includes short frame 1, short frame 2 and short frame 3, the electronic device outputs the first group of frames and the second group of frames in the order of: long frame 1, short frame 1, long frame 2, short frame 2, long frame 3, short frame 3.
[0052] In some embodiments of the present application, the first group of frames and the second group of frames may correspond to at least one output cycle, and one output cycle is composed of long frames and short frames output alternately at least once. That is, the first output cycle contains at least one long frame of the first group of frames and at least one short frame of the second group of frames. The first group of frames and the second group correspond to several output cycles, that is, the at least one long frame and the at least one short frame are output alternately several times. It should be noted that the output order and quantity of the at least one long frame and the at least one short frame contained in each of the output cycles are the same.
[0053] In some embodiments of the present application, the long frames and short frames that are alternately outputted may be normal exposure frames and underexposure frames in the long frames and short frames that are alternately outputted one by one, for example, a long frame, a normal exposure frame, a long frame, and an underexposure frame are outputted as one output cycle. It may also be a long frame and multiple normal exposure frames or multiple underexposure frames that are alternately outputted, for example, a long frame, a normal exposure frame, a long frame, an underexposure frame, a long frame, and an underexposure frame are outputted as one output cycle.
[0054] For example, Figure 2 As shown, taking the example that the first group of frames includes 4 long frames and the second group of frames includes 4 short frames, the output order of the electronic device alternately outputting the first group of frames and the second group of frames can be: long frame 201, normal exposure frame 202, long frame 203, underexposed frame 204, long frame 205, normal exposure frame 206, long frame 207, underexposed frame 208.
[0055] For example, Figure 3 As shown, taking the example that the first group of frames includes 4 long frames and the second group of frames includes 4 short frames, the output order of the electronic device alternately outputting the first group of frames and the second group of frames can be: long frame 301, normal exposure frame 302, long frame 303, underexposed frame 304, long frame 305, underexposed frame 306, long frame 307, normal exposure frame 308.
[0056] It should be noted that the purpose of including underexposed frames in the alternately output long frames and short frames is to retain details of areas with excessive brightness in the image to be captured, so that the captured image can have a larger dynamic range.
[0057] In some embodiments of the present application, the exposure levels of the underexposed frames included in the second group of frames may be the same or different.
[0058] For example, Figure 2 As shown, Figure 2 The exposure of the underexposed frame 204 and the exposure of the underexposed frame 208 may be the same or different.
[0059] In some embodiments of the present application, Figure 1 ,like Figure 4 As shown, the above step 101 may include the following steps 101a and 101b.
[0060] Step 101a: The electronic device determines a target exposure strategy that matches the ambient light parameters.
[0061] In some embodiments of the present application, the above ambient light parameter is used to indicate at least one of the following ambient light: the brightness value of the ambient light, the direction of the ambient light. It can be understood that the ambient light can be formed by multiple reflections of light from the surrounding environment surface when the electronic device is shooting.
[0062] In some embodiments of the present application, the brightness value of the ambient light may indicate the brightness of the light, such as the brightness value of the ambient light during the day is greater than the brightness value of the ambient light at night.
[0063] In some embodiments of the present application, the direction of the ambient light may indicate the direction in which the light is irradiated, for example, the direction of the light may be irradiated toward the electronic device or away from the electronic device.
[0064] It can be understood that the greater the brightness value of the ambient light is and the closer the direction of the ambient light is toward the electronic device, the greater the brightness of the ambient light indicated by the ambient light parameter in the electronic device.
[0065] In some embodiments of the present application, different ambient light parameters correspond to different exposure strategies.
[0066] Step 101b: The electronic device outputs a first set of frames and a second set of frames according to a target exposure strategy.
[0067] In some embodiments of the present application, the first group of frames and the second group of frames correspond to at least one output cycle, and under different exposure strategies, the number of underexposed frames or the number of normally exposed frames in each output cycle is different.
[0068] In some embodiments of the present application, the above exposure strategy is used to indicate the output order of alternating output between normally exposed frames and underexposed frames in long frames and short frames when the electronic device outputs the first set of frames and the second set of frames. That is, different exposure strategies indicate different output orders of alternating output between normally exposed frames and underexposed frames in long frames and short frames.
[0069] Since the ambient light parameter can indicate the brightness of the ambient light, and the exposure requirements are different under ambient light of different brightness, the present application can flexibly determine the number of normal exposure frames and the number of underexposed frames contained in the second group of frames that need to be output under the current ambient light according to the brightness of the ambient light. For example, when the brightness of the ambient light is large, fewer underexposed frames need to be output, or when the brightness of the ambient light is small, more underexposed frames need to be output. In this way, the electronic device can capture images under a combination of frames with multiple exposures, so that a target image with a clear subject and high contrast can be obtained based on the captured image, and the captured image can have more dynamic range and image details, thereby improving the image display effect.
[0070] In some embodiments of the present application, when the brightness of the environment indicated by the ambient light parameters is less than a first threshold, the target exposure strategy is the first exposure strategy; or, when the brightness of the environment indicated by the ambient light parameters is greater than or equal to a second threshold, the target exposure strategy is the second exposure strategy.
[0071] In some embodiments of the present application, under a first exposure strategy, the number of normally exposed frames in each output cycle is greater than or equal to the number of underexposed frames; under a second exposure strategy, the number of normally exposed frames in each output cycle is less than the number of underexposed frames.
[0072] In some embodiments of the present application, the above “ambient light brightness indicated by the ambient light parameter is less than the first threshold value” can be understood as: the ambient light brightness indicated by the ambient light parameter is small, that is, the ambient light is dark. Therefore, in the case where the ambient light brightness indicated by the ambient light parameter is less than the first threshold value, the above “under the first exposure strategy, the number of normal exposure frames in each output cycle is greater than or equal to the number of underexposed frames” can be understood as: in the case of dark ambient light, the number of normal exposure frames in the second group of frames output by the electronic device is greater. That is to say, in the case of dark ambient light, the electronic device can set the number of normal exposure frames in the output exposure frames to be greater than the number of underexposed frames.
[0073] In some embodiments of the present application, the above “the ambient light brightness indicated by the ambient light parameter is greater than or equal to the second threshold value” can be understood as: the ambient light brightness indicated by the ambient light parameter is larger, that is, the ambient light is brighter. Therefore, in the case where the ambient light brightness indicated by the ambient light parameter is greater than or equal to the second threshold value, the above “under the second exposure strategy, the number of normal exposure frames in each output cycle is less than the number of underexposed frames” can be understood as: when the ambient light is brighter, the number of underexposed frames in the second group of frames output by the electronic device is larger. That is to say, when the ambient light is brighter, the electronic device can set the number of underexposed frames in the output exposure frames to be greater than the number of normal exposure frames.
[0074] It can be understood that the smaller the ambient light brightness indicated by the ambient light parameter, the greater the number of normally exposed frames in the output second set of frames. Conversely, the greater the ambient light brightness indicated by the ambient light parameter, the greater the number of underexposed frames in the output second set of frames.
[0075] Exemplarily, taking the case where the first group of frames output by the electronic device includes 6 long frames and the second group of frames includes 6 short frames, under the first exposure strategy, the output order indicated by the first exposure strategy can be: long frame, normal exposure frame, long frame, normal exposure frame, long frame, underexposed frame, long frame, normal exposure frame, long frame, normal exposure frame, long frame, underexposed frame.
[0076] Exemplarily, taking the example that the first group of frames output by the electronic device includes 6 long frames and the second group of frames includes 6 short frames, under the second exposure strategy, the output order indicated by the second exposure strategy can be: long frame, normal exposure frame, long frame, underexposed frame, long frame, underexposed frame, long frame, normal exposure frame, long frame, underexposed frame, long frame, underexposed frame.
[0077] In some embodiments of the present application, the first threshold and the second threshold may be set by the user, or may be set by default by the electronic device, or may be determined based on big data. The embodiments of the present application are not specifically limited.
[0078] It should be noted that the first threshold and the second threshold may be the same or different.
[0079] In some embodiments of the present application, the electronic device can determine different exposure strategies according to the changed ambient light parameters when the ambient light parameters change during the shooting process. In other words, during the shooting process, the exposure strategy used by the electronic device can change with the change of the ambient light parameters.
[0080] Since the electronic device can determine a target exposure strategy with different numbers of normally exposed frames or underexposed frames output alternately each time according to different ambient light parameters, a suitable exposure strategy can be determined according to the ambient light parameters, thereby obtaining an image with a better shooting effect.
[0081] Step 102: The electronic device receives a shooting input.
[0082] In some embodiments of the present application, the above-mentioned shooting input can be used to trigger the electronic device to shoot an image. In other words, the shooting input can be an input for shooting an image, and the shooting input can be a shooting operation.
[0083] In some embodiments of the present application, the above-mentioned shooting input includes but is not limited to: the user's touch input to the electronic device through a touch device such as a finger or a stylus, or a voice command input by the user, or a specific gesture input by the user, or other feasible input, which can be determined according to actual use requirements and is not limited in the embodiments of the present application. Among them, the specific gesture in the embodiments of the present application can be any one of a single-click gesture, a sliding gesture, a drag gesture, a pressure recognition gesture, a long press gesture, an area change gesture, a double-press gesture, and a double-click gesture; the click input in the embodiments of the present application can be a single-click input, a double-click input, or any number of click inputs, etc., and can also be a long press input or a short press input.
[0084] In some examples of the present application, when the shooting input is a user's touch input to the electronic device, the electronic device can receive a user's click input to the photo control displayed by the electronic device to shoot. In actual implementation, it can be determined according to actual usage requirements, and the embodiments of the present application are not limited.
[0085] In some examples of the present application, when the shooting input is a touch input of the user to the electronic device, the electronic device can receive a long press input of the user to the shooting preview interface to shoot. In actual implementation, it can be determined according to actual use requirements, and the embodiments of the present application are not limited.
[0086] In some examples of the present application, when the shooting input is a user's voice input to the electronic device, the electronic device can receive the user's voice input and shoot. For example, the voice content of the voice input can be: "shoot", then the electronic device can receive the voice input and shoot. In actual implementation, it can be determined according to actual usage requirements, and the embodiments of the present application are not limited.
[0087] Step 103: The electronic device captures N target frames in response to the shooting input.
[0088] The N target frames include a first underexposed frame, and an output time of the first underexposed frame is closest to an input time of the shooting input.
[0089] In some embodiments of the present application, the N target frames may be: N target frames determined with the first underexposed frame as the center in the first group of frames and the second group of frames output by the electronic device.
[0090] In some embodiments of the present application, the above-mentioned “the output time of the first underexposed frame is closest to the input time of the shooting input” can be understood as: the first underexposed frame can be an underexposed frame output by the electronic device after receiving the shooting input, or the first underexposed frame can be an underexposed frame closest to the frame output by the electronic device after receiving the shooting input.
[0091] In some embodiments of the present application, after receiving a shooting input triggered by a user, the electronic device may capture N target frames centered around an underexposed frame closest to a frame corresponding to the shooting input.
[0092] It should be noted that after the electronic device receives the shooting input from the user, it will capture at least one short frame and its corresponding long frame when capturing frames.
[0093] For example, Figure 5 As shown, assuming that the electronic device needs to capture 6 target frames for shooting. If the frame corresponding to the shooting input is a long frame 503, the electronic device can capture a long frame 501, a normal exposure frame 502, a long frame 503, an underexposed frame 504, a long frame 505, and a normal frame 506 with the underexposed frame 504 closest to the shooting input as the center.
[0094] For example, Figure 6 As shown, assuming that the electronic device needs to capture 4 target frames for shooting, if the frame corresponding to the shooting input is a long frame 601, the electronic device can capture the long frame 601, the underexposed frame 602, the long frame 603, and the normal exposure frame 604 with the underexposed frame 602 closest to the shooting input as the center.
[0095] Step 104: The electronic device obtains a target image based on the N target frames.
[0096] In some embodiments of the present application, the target image may be an image containing a photographed object.
[0097] In some embodiments of the present application, the electronic device can obtain N frames of first images corresponding to N frames of target frames, and perform noise reduction and synthesis processing on the N frames of first images, so that while ensuring that the photographed object in the obtained target image is clear, the target image can also have a higher dynamic range.
[0098] It can be understood that since the exposure of the N target frames is different, the image details in the obtained N first images are also different. For example, in the image corresponding to the underexposed frame, the area with high ambient light brightness is rich in details; in the image corresponding to the long frame, the area with low ambient light brightness is rich in details; in the image corresponding to the normal exposure frame, the details of the subject are rich.
[0099] Furthermore, the electronic device can further improve the dynamic range of the synthesized image through a tone mapping algorithm, and perform image signal processing (ISP) to finally obtain a target image.
[0100] In the shooting method provided in the embodiment of the present application, since the output frames can be divided into long frames and short frames, and the output short frames can be divided into normal exposure frames or under-exposed frames, it is possible to capture multiple target frames including under-exposed frames during shooting, so that the electronic device can capture images under a variety of exposure frame combinations, thereby obtaining a target image with a clear subject and high contrast based on the captured image, and further allowing the captured image to have more dynamic range and image details, thereby improving the image display effect.
[0101] In some embodiments of the present application, Figure 1 ,like Figure 7 As shown, the above step 104 may include the following steps 104a to 104d.
[0102] Step 104a: The electronic device obtains N frames of first images corresponding to N frames of target frames.
[0103] In some embodiments of the present application, the electronic device may capture N target frames, perform shooting, and obtain N first images corresponding one-to-one to the N target frames.
[0104] Step 104b: The electronic device uses the first frame as a reference frame and performs multi-frame noise reduction processing on the second image to obtain a third image.
[0105] In some embodiments of the present application, the first frame may be any normal exposure frame among the N target frames.
[0106] In some embodiments of the present application, the above-mentioned reference frame can be used to indicate the reference brightness of the target image, and provide a reference value for noise reduction processing of other first images in N frames of first images except the first image corresponding to the reference frame.
[0107] In some embodiments of the present application, the second image may include a first image corresponding to a frame other than an underexposed frame among the N target frames.
[0108] It can be understood that the signal-to-noise ratio of the third image is greater than the signal-to-noise ratio of any first image in the N first images.
[0109] In some embodiments of the present application, the electronic device may use a multi-frame noise reduction algorithm to perform noise reduction on the second image. In actual implementation, the electronic device may use any multi-frame noise reduction algorithm to perform noise reduction on the second image, which is not specifically limited in the embodiments of the present application.
[0110] Exemplarily, the electronic device can use the first frame as the reference frame, find multiple pixels with noise in each second image, and replace the pixels with noise in the first frame with pixels without noise by calculating and screening the number of noise and its position, to obtain a third image. In other words, the third image can be synthesized from the first images corresponding to all frames except the underexposed frame in the N target frames. In this way, the clarity of the subject in the third image obtained by noise reduction processing can be higher.
[0111] Step 104c: the electronic device performs single-frame noise reduction processing on the fourth image corresponding to the under-explosion frame in the N target frames to obtain at least one fifth image.
[0112] In some embodiments of the present application, the signal-to-noise ratio of the fifth image is greater than the signal-to-noise ratio of any fourth image. In actual implementation, the electronic device can perform noise reduction processing on the fourth image by any single-frame noise reduction algorithm to obtain at least one fifth image. This embodiment of the present application is not specifically limited.
[0113] Exemplarily, when performing single-frame noise reduction processing on the fourth image, the electronic device may search for similar similarities on the fourth image, and obtain a variance of reduced noise by weighted averaging, thereby obtaining at least one fifth image with a higher signal-to-noise ratio.
[0114] In some embodiments of the present application, when N target frames include an under-burst frame, the electronic device may perform single-frame noise reduction processing on a fourth image corresponding to the under-burst frame to obtain a fifth image.
[0115] In the case that the N target frames include multiple underexposure frames, if the exposure of the multiple underexposure frames is the same, the electronic device can perform multiple-frame noise reduction processing on the multiple underexposure frames to obtain a second image.
[0116] When the N target frames include multiple underexposure frames, if the multiple underexposure frames have different exposures, the electronic device may first group the multiple underexposure frames according to the exposures of the underexposure frames, and perform noise reduction on each group of underexposure frames.
[0117] Step 104d: The electronic device performs fusion processing on the third image and at least one frame of the fifth image to obtain a target image.
[0118] In some embodiments of the present application, the electronic device may use an exposure fusion algorithm to fuse the third image and at least one frame of the fifth image to obtain a target image.
[0119] Exemplarily, the electronic device may calculate weights of the contrast, saturation and brightness of the third image and at least one frame of the fifth image to obtain weight values of the third image and each frame of the fifth image, and obtain the target image by weighted fusion.
[0120] For example, N target frames include long frame 801, long frame 802, long frame 803, normal exposure frame 804, normal exposure frame 805 and under-exposure frame 806. The electronic device can select normal exposure frame 804 as the reference frame, such as Figure 8 As shown, multi-frame noise reduction processing is performed on the first image corresponding to the long frame 801, the first image corresponding to the long frame 802, the first image corresponding to the long frame 803, the first image corresponding to the normal exposure frame 804, and the first image corresponding to the normal exposure frame 805 to obtain a third image 807; and the electronic device performs single-frame noise reduction processing on the underexposed frame 806 to obtain a fifth image 808. Then, the electronic device can perform exposure fusion of the third image 807 and the fifth image 808 to obtain a target image.
[0121] In some embodiments of the present application, the above step 104b can be performed before the above step 104c, or after the above step 104c, or simultaneously with the above step 104c, which is not specifically limited in the embodiments of the present application.
[0122] In this way, since the electronic device can perform noise reduction processing on the images corresponding to the underexposed frames in the N target frames and the images corresponding to the frames other than the underexposed frames, the signal-to-noise ratio of the obtained image can be improved, so that the image after noise reduction processing is clearer and has a larger dynamic range, thereby obtaining an image with better display effect.
[0123] In some embodiments of the present application, when the N target frames include a plurality of first underexposed frames, the plurality of first underexposed frames may include a plurality of underexposed frames corresponding to different exposure levels.
[0124] In this way, since the electronic device can capture underexposed frames corresponding to multiple frames with different exposure levels, the final image can contain the dynamic range of multiple frames of images with different exposure levels, thereby improving the contrast of the final image, providing more dynamic range and image details, and thus improving the display effect of the captured image.
[0125] In some embodiments of the present application, Figure 1 ,like Fig. 9 As shown, the above step 104 may also include the following steps 104e to 104i.
[0126] Step 104e: The electronic device obtains N frames of first images corresponding to N frames of target frames.
[0127] Step 104f: The electronic device groups the multiple first underexposed frames to obtain at least two underexposed frame groups.
[0128] Among them, all the underexposed frames in each underexposed frame group have the same exposure degree.
[0129] In some embodiments of the present application, the electronic device may group the multiple first underexposed frames according to their exposure levels to obtain at least two underexposed frame groups.
[0130] For example, taking N target frames including underexposed frame 1, underexposed frame 2, underexposed frame 3 and underexposed frame 4 as an example, assuming that the exposure of underexposed frame 1 is EV-, the exposure of underexposed frame 2 is EV-, the exposure of underexposed frame 3 is EV-, and the exposure of underexposed frame 4 is EV-. Then the electronic device can group the four underexposed frames to obtain an underexposed frame group with an exposure of EV- and an underexposed frame group with an exposure of EV-.
[0131] Step 104g: The electronic device performs noise reduction processing on first images corresponding to all underexposed frames in the first underexposed frame group with the second underexposed frame as a reference frame to obtain at least one sixth image.
[0132] The first underexposed frame group is an underexposed frame group including at least two underexposed frames in at least two underexposed frame groups, and the second underexposed frame is any underexposed frame in the first underexposed frame group.
[0133] In some embodiments of the present application, the electronic device may use a multi-frame noise reduction algorithm to perform noise reduction processing on the first images corresponding to all underexposed frames in the first underexposed frame group to obtain at least one sixth image.
[0134] For example, the electronic device can find multiple pixels with noise in the first image corresponding to the underexposed frames other than the second underexposed frame in the first underexposed frame group, and replace the pixels with noise in the second underexposed frame with pixels without noise by calculating and screening the number of noise and their positions, to obtain at least one sixth image. In this way, the second image after noise reduction processing can include more image details in bright areas.
[0135] Step 104h: the electronic device performs single-frame noise reduction on the third underexposed frame for the second underexposed frame group, taking the third underexposed frame as a reference frame, to obtain a seventh image.
[0136] The second underexposed frame group is an underexposed frame group including one underexposed frame in at least two underexposed frame groups, and the third underexposed frame is an underexposed frame in the second underexposed frame group.
[0137] In some embodiments of the present application, when the second underexposed frame group includes an underexposed frame, the electronic device may perform noise reduction processing on the underexposed frame using a single-frame noise reduction algorithm to obtain a seventh image.
[0138] Exemplarily, the electronic device may use a linear single-frame noise reduction algorithm or a nonlinear single-frame noise reduction algorithm to reduce noise on a single underexposed frame.
[0139] Exemplarily, the electronic device may use a wavelet transform domain single-frame noise reduction algorithm or a Fourier transform domain single-frame noise reduction algorithm to reduce noise on a single underexposed frame.
[0140] In actual implementation, other single-frame noise reduction algorithms can be used to perform noise reduction on a single underexposed frame as required, and the embodiments of the present application do not make specific limitations.
[0141] Step 104i: The electronic device obtains a target image based on at least one frame of the sixth image, one frame of the seventh image, and the eighth image.
[0142] The eighth image includes: other first images among the N frames of first images except the first images corresponding to the plurality of first under-exposed frames; or other first images after noise reduction processing.
[0143] It can be understood that the eighth image may be the first image, or may be the first image after noise reduction processing.
[0144] In some embodiments of the present application, the electronic device may fuse at least one sixth image obtained through multi-frame noise reduction processing, and the seventh and eighth images obtained through single-frame noise reduction processing to obtain a target image.
[0145] For example, N target frames include long frame 1001, long frame 1002, long frame 1003, long frame 1004, normal exposure frame 1005, underexposed frame 1006, underexposed frame 1007 and underexposed frame 1008, and underexposed frame 1006 and underexposed frame 1007 are underexposed frames with the same exposure, and underexposed frame 1006 and underexposed frame 1008 are underexposed frames with different exposures. The electronic device can select normal exposure frame 1005 as the reference frame, such as Fig.10As shown, the first image corresponding to the long frame 1001, the first image corresponding to the long frame 1002, the first image corresponding to the long frame 1003, the first image corresponding to the long frame 1004 and the first image corresponding to the normal exposure frame 1005 are subjected to multi-frame noise reduction processing to obtain an eighth image 1009; and the electronic device performs multi-frame noise reduction processing on the first image corresponding to the underexposed frame 1006 and the first image corresponding to the underexposed frame 1007 to obtain a sixth image 1010; and performs single-frame noise reduction processing on the first image corresponding to the underexposed frame 1008 to obtain a seventh image 1011. Then, the electronic device can perform exposure fusion on the eighth image 1009, the sixth image 1010 and the seventh image 1011 to obtain the target image.
[0146] It should be noted that the above step 104h can be performed before the above step 104g, or after the above step 104g, or simultaneously with the step 104g, which is not specifically limited in the embodiment of the present application.
[0147] In some embodiments of the present application, for other descriptions in the above steps 104e to 104i, reference may be made to the relevant descriptions in the above steps 104a to 104d, which will not be repeated here.
[0148] In some embodiments of the present application, the electronic device may perform the above steps 104a to 104d for N target frames separately, or may perform the above steps 104e to 104i for N target frames separately. Under the premise that there is no contradiction, they may also be performed in combination with each other, which may be determined according to actual use requirements, and the embodiments of the present application do not limit this.
[0149] In this way, since the electronic device can perform noise reduction on the multiple underexposed frames according to the exposure groups when the N target frames include multiple underexposed frames corresponding to different exposure levels, the final image can have more image details at different exposure levels, thereby having a larger dynamic range and obtaining an image with better display effect.
[0150] In some embodiments of the present application, after the above step 102, the shooting method provided by the embodiment of the present application may further include the following step 105.
[0151] Step 105: The electronic device displays a shooting preview interface in response to the shooting input.
[0152] The shooting preview interface displays the first image corresponding to the longest frame among the N target frames.
[0153] In some embodiments of the present application, when the flicker frequency of the ambient light is not an integer multiple of the exposure time of the electronic device, when the electronic device shoots an image, the preview image in the shooting preview interface will have strobing, vertical stripes, and other phenomena that affect the preview effect. Therefore, in the shooting method provided in the embodiment of the present application, the first image corresponding to the long frame in the N-frame target frame can be used for preview, so as to eliminate strobing, vertical stripes, and other phenomena and improve the preview display effect of the image.
[0154] In some embodiments of the present application, the electronic device may display the first image corresponding to any long frame in the N target frames in the shooting preview interface for the user to preview.
[0155] For example, Figure 5 As shown, it is assumed that the electronic device needs to capture 6 target frames for shooting. If the frame corresponding to the shooting input is a long frame 503, the electronic device can capture a long frame 501, a normal exposure frame 502, a long frame 503, an underexposed frame 504, a long frame 505, and a normal exposure frame 506 for shooting, that is, shooting with 6 target frames. After receiving the shooting input, the electronic device can display the first image corresponding to the long frame 503 in the shooting preview interface for the user to preview.
[0156] It should be noted that the above step 105 may be performed before steps 103 and 104, may be performed after steps 103 and 104, or may be performed between steps 103 and 104. This embodiment of the present application does not specifically limit this.
[0157] In this way, since the first image corresponding to the long frame among the N target frames is used for preview, the image corresponding to the long frame with a longer exposure time can eliminate stroboscopic and vertical stripes, thereby improving the preview display effect of the image.
[0158] The above-mentioned method embodiments, or various possible implementation methods in each method embodiment, can be executed separately, or, under the premise that there is no contradiction, can also be executed in combination with each other. The specific implementation can be determined according to actual usage requirements, and the embodiments of the present application are not limited to this.
[0159] The following is an illustrative example of the photographing method provided in the embodiment of the present application.
[0160] like Fig.10 As shown, the shooting method may include the following steps 201 to 206.
[0161] Step 201: The electronic device determines a target exposure strategy according to ambient light parameters.
[0162] In some embodiments of the present application, the electronic device can set the exposure of different exposure frames by reducing or increasing the exposure time.
[0163] Step 202: The electronic device outputs a first set of frames and a second set of frames according to a target exposure strategy.
[0164] In some embodiments of the present application, the electronic device may pass through a sensor a first set of frames and a second set of frames.
[0165] In some embodiments of the present application, the first group of frames includes M long frames, and the second group of frames includes M short frames. The long frames and the short frames are output alternately. The short frames are normally exposed frames or underexposed frames. The M short frames include normally exposed frames and underexposed frames, and M is an integer greater than 1.
[0166] Step 203: The electronic device receives and responds to the user's shooting input, shoots N target frames, and obtains N first images.
[0167] Step 204: The electronic device displays a first image corresponding to any long frame in the N target frames in the shooting preview interface.
[0168] Step 205: The electronic device performs multi-frame noise reduction processing on the other first images among the N frames of first images except the first image corresponding to the underexposed frame to obtain a frame of third image; and performs single-frame noise reduction processing on the first image corresponding to the underexposed frame to obtain a frame of fifth image.
[0169] Step 206: The electronic device synthesizes the third image and the fifth image to obtain a target image.
[0170] In the shooting method provided in the embodiment of the present application, when shooting, the electronic device can alternately output long frames and short frames including normal exposure frames or underexposed frames according to the ambient light parameters, so that N target frames centered on the underexposed frame whose output time is closest to the input time of the shooting input can be captured from the alternating long frames and short frames for shooting, and N frames of images can be obtained, and the image corresponding to any long frame in the N target frames can be previewed; then, the electronic device can perform noise reduction and synthesis processing on the images corresponding to the N target frames to obtain the final target image. In this way, on the one hand, since the final image is obtained from multiple frames of images, the clarity of the subject in the image can be guaranteed; on the other hand, since the final image is synthesized from images of different exposures, the contrast of the image can be improved, providing more dynamic range and image details, thereby improving the display effect of the captured image.
[0171] The shooting method provided in the embodiment of the present application can be executed by a shooting device. In the embodiment of the present application, the shooting method is executed by a shooting device as an example to illustrate the shooting device provided in the embodiment of the present application.
[0172] Fig.12 FIG. 1 shows a possible structural diagram of a shooting device involved in an embodiment of the present application. Fig.12 As shown, the photographing device 120 may include: an output module 121 , a receiving module 122 , a photographing module 123 and a processing module 124 .
[0173] Among them, the output module 121 is used to output a first group of frames and a second group of frames, the first group of frames includes M long frames, the second group of frames includes M short frames, the long frames and the short frames are output alternately, the short frames are normally exposed frames or underexposed frames, and the M short frames include normally exposed frames and underexposed frames; the receiving module 122 is used to receive shooting input; the shooting module 123 is used to capture N target frames in response to the shooting input; the processing module 124 is used to obtain a target image based on the N target frames; wherein the N target frames include a first underexposed frame, the output time of the first underexposed frame is closest to the input time of the shooting input, and M and N are integers greater than 1.
[0174] In a possible implementation, the output module 121 is specifically configured to:
[0175] Determine a target exposure strategy that matches ambient light parameters;
[0176] According to the target exposure strategy, outputting a first group of frames and a second group of frames;
[0177] The first group of frames and the second group of frames correspond to at least one output cycle, and under different exposure strategies, the number of underexposed frames or the number of normally exposed frames in each output cycle is different.
[0178] In a possible implementation manner, when the brightness of the ambient light indicated by the ambient light parameter is less than a first threshold, the target exposure strategy is a first exposure strategy;
[0179] or,
[0180] When the brightness of the ambient light indicated by the ambient light parameter is greater than or equal to the second threshold, the target exposure strategy is the second exposure strategy;
[0181] Wherein, under the first exposure strategy, the number of normally exposed frames in each output cycle is greater than or equal to the number of underexposed frames;
[0182] Under the second exposure strategy, the number of normally exposed frames in each output cycle is less than the number of underexposed frames.
[0183] In a possible implementation, the processing module 124 is specifically configured to:
[0184] Obtain N frames of first images corresponding to N frames of target frames;
[0185] Taking the first frame as a reference frame, performing multi-frame noise reduction processing on the second image to obtain a third image, where the second image includes the first image corresponding to the frame other than the underexposed frame in the N target frames;
[0186] Performing single-frame noise reduction processing on a fourth image corresponding to an under-explosion frame among the N target frames to obtain at least one fifth image;
[0187] The third image and at least one frame of the fifth image are fused to obtain a target image.
[0188] In a possible implementation, when the N target frames include a plurality of first underexposed frames, the plurality of first underexposed frames include a plurality of underexposed frames corresponding to different exposure levels.
[0189] In a possible implementation, the processing module 124 is specifically configured to:
[0190] Obtain N frames of first images corresponding to N frames of target frames;
[0191] Grouping the plurality of first underexposed frames to obtain at least two underexposed frame groups, wherein all underexposed frames in each underexposed frame group have the same exposure degree;
[0192] For the first underexposed frame group, taking the second underexposed frame as a reference frame, performing noise reduction processing on first images corresponding to all underexposed frames in the first underexposed frame group to obtain at least one sixth image, wherein the first underexposed frame group is: an underexposed frame group including at least two underexposed frames in at least two underexposed frame groups, and the second underexposed frame is: any underexposed frame in the first underexposed frame group;
[0193] For the second underexposed frame group, taking the third underexposed frame as a reference frame, performing single-frame noise reduction on the third underexposed frame to obtain a seventh image, wherein the second underexposed frame group is: an underexposed frame group including one underexposed frame in at least two underexposed frame groups, and the third underexposed frame is an underexposed frame in the second underexposed frame group;
[0194] Based on at least one sixth image, one seventh image and an eighth image, a target image is obtained, and the eighth image includes: other first images in the N first images except the first images corresponding to the multiple first underexposed frames; or other first images after noise reduction processing.
[0195] An embodiment of the present application provides a shooting device. Since the output frames can be divided into long frames and short frames, and the output short frames are divided into normal exposure frames or under-exposed frames, when shooting, by capturing multiple target frames including under-exposed frames, the electronic device can capture images under a variety of exposure frame combinations, so that a target image with a clear subject and high contrast can be obtained based on the captured image, and the captured image can have more dynamic range and image details, thereby improving the image display effect.
[0196] The shooting device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application does not make specific limitations.
[0197] The shooting device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0198] The shooting device provided in the embodiment of the present application can implement each process implemented in the above-mentioned shooting method embodiment and achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0199] Alternatively, if Fig.13 As shown, an embodiment of the present application further provides an electronic device 1300, including a processor 1301 and a memory 1302, wherein the memory 1302 stores programs or instructions that can be executed on the processor 1301, and when the program or instructions are executed by the processor 1301, the various steps of the above-mentioned shooting method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0200] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0201] Fig.14 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0202] The electronic device 1400 includes but is not limited to: a radio frequency unit 1401, a network module 1402, an audio output unit 1403, an input unit 1404, a sensor 1405, a display unit 1406, a user input unit 1407, an interface unit 1408, a memory 1409, and a processor 1410 and other components.
[0203] Those skilled in the art will appreciate that the electronic device 1400 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 1410 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption through the power management system. 14 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0204] Among them, the processor 1410 is used to output a first group of frames and a second group of frames, the first group of frames includes M long frames, the second group of frames includes M short frames, the long frames and the short frames are output alternately, the short frames are normally exposed frames or underexposed frames, and the M short frames include normally exposed frames and underexposed frames; the user input unit 1407 is used to receive shooting input; the processor 1410 is also used to capture N target frames in response to the shooting input; and is also used to obtain a target image based on the N target frames; wherein the N target frames include a first underexposed frame, the output time of the first underexposed frame is closest to the input time of the shooting input, and M and N are integers greater than 1.
[0205] In a possible implementation manner, the processor 1410 is specifically configured to:
[0206] Determine a target exposure strategy that matches ambient light parameters;
[0207] According to the target exposure strategy, outputting a first group of frames and a second group of frames;
[0208] The first group of frames and the second group of frames correspond to at least one output cycle, and under different exposure strategies, the number of underexposed frames or the number of normally exposed frames in each output cycle is different.
[0209] In a possible implementation manner, when the brightness of the ambient light indicated by the ambient light parameter is less than a first threshold, the target exposure strategy is a first exposure strategy;
[0210] or,
[0211] When the brightness of the ambient light indicated by the ambient light parameter is greater than or equal to the second threshold, the target exposure strategy is the second exposure strategy;
[0212] Wherein, under the first exposure strategy, the number of normally exposed frames in each output cycle is greater than or equal to the number of underexposed frames;
[0213] Under the second exposure strategy, the number of normally exposed frames in each output cycle is less than the number of underexposed frames.
[0214] In a possible implementation manner, the processor 1410 is specifically configured to:
[0215] Obtain N frames of first images corresponding to N frames of target frames;
[0216] Taking the first frame as a reference frame, performing multi-frame noise reduction processing on the second image to obtain a third image, where the second image includes the first image corresponding to the frame other than the underexposed frame in the N target frames;
[0217] Performing single-frame noise reduction processing on a fourth image corresponding to an under-explosion frame among the N target frames to obtain at least one fifth image;
[0218] The third image and at least one frame of the fifth image are fused to obtain a target image.
[0219] In a possible implementation, when the N target frames include a plurality of first underexposed frames, the plurality of first underexposed frames include a plurality of underexposed frames corresponding to different exposure levels.
[0220] In a possible implementation manner, the processor 1410 is specifically configured to:
[0221] Obtain N frames of first images corresponding to N frames of target frames;
[0222] Grouping the plurality of first underexposed frames to obtain at least two underexposed frame groups, wherein all underexposed frames in each underexposed frame group have the same exposure degree;
[0223] For the first underexposed frame group, taking the second underexposed frame as a reference frame, performing noise reduction processing on first images corresponding to all underexposed frames in the first underexposed frame group to obtain at least one sixth image, wherein the first underexposed frame group is: an underexposed frame group including at least two underexposed frames in at least two underexposed frame groups, and the second underexposed frame is: any underexposed frame in the first underexposed frame group;
[0224] For the second underexposed frame group, taking the third underexposed frame as a reference frame, performing single-frame noise reduction on the third underexposed frame to obtain a seventh image, wherein the second underexposed frame group is: an underexposed frame group including one underexposed frame in at least two underexposed frame groups, and the third underexposed frame is an underexposed frame in the second underexposed frame group;
[0225] Based on at least one sixth image, one seventh image and an eighth image, a target image is obtained, and the eighth image includes: other first images in the N first images except the first images corresponding to the multiple first underexposed frames; or other first images after noise reduction processing.
[0226] An embodiment of the present application provides an electronic device. Since the output frames can be divided into long frames and short frames, and the output short frames can be divided into normal exposure frames or under-exposed frames, when shooting, by capturing multiple target frames including under-exposed frames, the electronic device can capture images under various exposure frame combinations, so that a target image with a clear subject and high contrast can be obtained based on the captured image, and the captured image can have more dynamic range and image details, thereby improving the image display effect.
[0227] It should be understood that in the embodiment of the present application, the input unit 1404 may include a graphics processor (Graphics Processing Unit, GPU) 14041 and a microphone 14042, and the graphics processor 14041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1406 may include a display panel 14061, and the display panel 14061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1407 includes a touch panel 14071 and at least one of other input devices 14072. The touch panel 14071 is also called a touch screen. The touch panel 14071 may include two parts: a touch detection device and a touch controller. Other input devices 14072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0228] The memory 1409 can be used to store software programs and various data. The memory 1409 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1409 may include a volatile memory or a non-volatile memory, or the memory 1409 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1409 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0229] The processor 1410 may include one or more processing units; optionally, the processor 1410 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1410.
[0230] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned shooting method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0231] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0232] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned shooting method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0233] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0234] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned shooting method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0235] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0236] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0237] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A shooting method, characterized in that: The method comprises: Outputting a first group of frames and a second group of frames, wherein the first group of frames includes M long frames, and the second group of frames includes M short frames, the long frames and the short frames are output alternately, the short frames are normally exposed frames or underexposed frames, and the M short frames include the normally exposed frames and the underexposed frames; Receive shooting input; In response to the shooting input, capturing N target frames; Based on the N target frames, a target image is obtained; The N target frames include a first underexposed frame, an output time of the first underexposed frame is closest to an input time of the shooting input, and M and N are integers greater than 1.
2. The method according to claim 1, characterized in that: The outputting of the first set of frames and the second set of frames comprises: Determine a target exposure strategy that matches ambient light parameters; outputting the first set of frames and the second set of frames according to the target exposure strategy; The first group of frames and the second group of frames correspond to at least one output cycle, and under different exposure strategies, the number of underexposed frames or the number of normally exposed frames in each output cycle is different.
3. The method according to claim 2, characterized in that When the brightness of the ambient light indicated by the ambient light parameter is less than a first threshold, the target exposure strategy is a first exposure strategy; or, When the brightness of the ambient light indicated by the ambient light parameter is greater than or equal to a second threshold, the target exposure strategy is a second exposure strategy; Wherein, under the first exposure strategy, the number of normally exposed frames in each of the output cycles is greater than or equal to the number of underexposed frames; Under the second exposure strategy, the number of normally exposed frames in each of the output cycles is less than the number of underexposed frames.
4. The method according to claim 1, characterized in that: The step of obtaining a target image based on the N target frames includes: Acquire N frames of first images corresponding to the N frames of target frames; Taking the first frame as a reference frame, performing multi-frame noise reduction processing on the second image to obtain a third image, wherein the second image includes the first image corresponding to the frame other than the underexposed frame in the N target frames; Performing single-frame noise reduction processing on a fourth image corresponding to an under-explosion frame among the N target frames to obtain at least one fifth image; The third image and the at least one frame of the fifth image are fused to obtain a target image.
5. The method according to any one of claims 1 to 4, characterized in that: In a case where the N target frames include a plurality of first underexposed frames, the plurality of first underexposed frames include a plurality of underexposed frames corresponding to different exposure levels.
6. The method according to claim 5, characterized in that The step of obtaining a target image based on the N target frames includes: Acquire N frames of first images corresponding to the N frames of target frames; Grouping the plurality of first underexposed frames to obtain at least two underexposed frame groups, wherein all underexposed frames in each of the underexposed frame groups have the same exposure degree; For the first underexposed frame group, taking the second underexposed frame as a reference frame, performing noise reduction processing on the first images corresponding to all the underexposed frames in the first underexposed frame group to obtain at least one sixth image, wherein the first underexposed frame group is: an underexposed frame group including at least two underexposed frames in the at least two underexposed frame groups, and the second underexposed frame is: any underexposed frame in the first underexposed frame group; For the second underexposed frame group, taking the third underexposed frame as a reference frame, performing single-frame noise reduction on the third underexposed frame to obtain a seventh image, wherein the second underexposed frame group is: an underexposed frame group including one underexposed frame in the at least two underexposed frame groups, and the third underexposed frame is an underexposed frame in the second underexposed frame group; The target image is obtained based on the at least one sixth image, the one seventh image and the eighth image, and the eighth image includes: other first images in the N first images except the first images corresponding to the multiple first underexposed frames; or, the other first images after noise reduction processing.
7. A photographing device, characterized in that: The device comprises: an output module, a receiving module, a shooting module and a processing module; The output module is used to output a first group of frames and a second group of frames, the first group of frames includes M long frames, the second group of frames includes M short frames, the long frames and the short frames are output alternately, the short frames are normally exposed frames or underexposed frames, and the M short frames include the normally exposed frames and the underexposed frames; The receiving module is used to receive shooting input; The shooting module is used to capture N target frames output by the output module in response to the shooting input received by the receiving module; The processing module is used to obtain a target image based on the N target frames captured by the shooting module; The N target frames include a first underexposed frame, an output time of the first underexposed frame is closest to an input time of the shooting input, and M and N are integers greater than 1.
8. The device according to claim 7, characterized in that The device further comprises: a determination module; The determination module is used to determine a target exposure strategy that matches the ambient light parameters; The output module is specifically configured to output the first set of frames and the second set of frames according to the target exposure strategy determined by the determination module; The first group of frames and the second group of frames correspond to at least one output cycle, and under different exposure strategies, the number of underexposed frames or the number of normally exposed frames in each output cycle is different.
9. The device according to claim 7, characterized in that The processing module is specifically used for: Taking the first frame as a reference frame, performing multi-frame noise reduction processing on the third image to obtain a second image, wherein the third image includes the first image corresponding to the frame other than the underexposed frame in the N target frames; Performing single-frame noise reduction processing on a fourth image corresponding to an under-explosion frame among the N target frames to obtain at least one fifth image; The third image and the at least one frame of the fifth image are fused to obtain a target image.
10. The device according to any one of claims 7 to 9, characterized in that In a case where the N target frames include a plurality of first underexposed frames, the plurality of first underexposed frames include a plurality of underexposed frames corresponding to different exposure levels.
11. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the shooting method according to any one of claims 1 to 7 are implemented.
12. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the shooting method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Image processing method and device, storage medium and electronic equipment
CN110213502A
Photographing method, photographing device and storage medium
CN116170700A