Video shooting method, device, electronic device and storage medium
By collecting video frames of multiple frames of different exposure values in HDR scenes and synthesizing them, the problems of overexposure in high-light areas and loss of details in dark areas in HDR scenes are solved, and high-quality video shooting and personalized needs are achieved.
Patent Information
- Application Number
- CN202310960379.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-01
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2043-08-01
AI Technical Summary
In HDR scenes, the highlight area is prone to overexposure or loss of details in dark area, and the shooting effect cannot be adjusted according to the user's personalized needs, resulting in poor video shooting quality.
By responding to the user's adjustment operation of the HDR exposure adjustment control in the camera preview interface, the video shooting parameters are determined, and multiple frames of initial video frames are collected at each acquisition time. The exposure values of each frame are different. Then, these initial video frames are synthesized to generate the target video frame.
It realizes the avoidance of overexposure of the highlight area in HDR scenes, and at the same time improves the details of the dark area, improves the quality of video shooting, meets the personalized needs of users, and increases flexibility.
Smart Images

Figure CN117714900B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of image processing technology, and in particular, relates to a video shooting method, device, electronic device and computer-readable storage medium. Background Art
[0002] With the widespread popularization and rapid development of terminal devices such as smartphones, the functions of terminal devices such as smartphones are becoming more and more complete. For example, users can take photos with smartphones.
[0003] In the related art, when shooting videos in a High Dynamic Range (HDR) scene, due to the large brightness range in the shooting scene, it is easy to have problems such as overexposure of highlight areas or loss of details in dark areas, and it is impossible to adjust the shooting effect of the HDR scene according to the user's personalized needs, which not only leads to poor video shooting quality in the HDR scene, but also fails to meet the user's personalized needs and has poor flexibility. Summary of the invention
[0004] The embodiments of the present application provide a video shooting method, device, electronic device and computer-readable storage medium, which can solve the problem that the highlight area is easily overexposed or the details of the dark area are lost due to the large brightness range in the HDR scene, and the shooting effect of the HDR scene cannot be adjusted according to the personalized needs of the user, which not only leads to poor video shooting quality of the HDR scene, but also cannot meet the personalized needs of the user and has poor flexibility.
[0005] In a first aspect, an embodiment of the present application provides a video shooting method, comprising: determining video shooting parameters in response to an adjustment operation of an exposure adjustment control corresponding to HDR in a camera preview interface; in response to a trigger operation of a recording start control, capturing multiple frames of initial video frames at each capture moment according to the video shooting parameters, wherein the exposure values of the initial video frames are different; and synthesizing the multiple frames of initial video frames captured at each capture moment to respectively generate target video frames corresponding to each capture moment.
[0006] In a possible implementation manner of the first aspect, before determining the video shooting parameters in response to the adjustment operation of the exposure adjustment control corresponding to HDR in the camera preview interface, the method further includes:
[0007] Determine the current dynamic range corresponding to the current scene according to the preview image collected during the preview process;
[0008] When the current dynamic range is greater than or equal to the first threshold, the exposure adjustment control is displayed in the camera preview interface.
[0009] Optionally, in another possible implementation manner of the first aspect, the video shooting parameters include a target exposure value corresponding to each initial video frame; accordingly, the determining the video shooting parameters in response to an adjustment operation of an exposure adjustment control corresponding to HDR in a camera preview interface includes:
[0010] In response to an adjustment operation on an exposure adjustment control, determining an exposure level corresponding to the adjustment operation;
[0011] According to the exposure level, the target exposure value corresponding to each initial video frame is determined.
[0012] Optionally, in another possible implementation of the first aspect, determining the target exposure value corresponding to each initial video frame according to the exposure level includes:
[0013] Determine the current dynamic range corresponding to the current scene according to the preview image collected during the preview process;
[0014] According to the current dynamic range, determine the reference exposure value corresponding to the current scene;
[0015] Determine the proportional relationship between the reference exposure value and the target exposure value corresponding to each initial video frame according to the exposure level;
[0016] The target exposure value corresponding to each initial video frame is determined according to the reference exposure value and the proportional relationship between the reference exposure value and the target exposure value corresponding to each initial video frame.
[0017] Optionally, in yet another possible implementation of the first aspect, before determining the proportional relationship between each initial video frame and the reference exposure value according to the exposure level, the method further includes:
[0018] When the exposure level is greater than the second threshold, the number of initial video frames is increased.
[0019] Optionally, in yet another possible implementation of the first aspect, the video shooting parameters include a target exposure value corresponding to each initial video frame; accordingly, the step of acquiring multiple initial video frames at each acquisition moment according to the video shooting parameters includes:
[0020] Obtain the conversion gain parameters corresponding to the image sensor;
[0021] According to the target exposure value and conversion gain parameter corresponding to each initial video frame, the target exposure time, the target conversion gain and the target analog gain corresponding to each initial video frame are determined respectively;
[0022] According to the target exposure time, target conversion gain and target analog gain corresponding to each initial video frame, multiple initial video frames are collected at each collection moment.
[0023] Optionally, in another possible implementation of the first aspect, the synthesizing of the multiple initial video frames collected at each collection moment to generate target video frames corresponding to each collection moment respectively includes:
[0024] Performing synthesis processing on multiple initial video frames collected at each collection moment to generate synthetic video frames corresponding to each collection moment;
[0025] Tone mapping is performed on the synthetic video frame corresponding to each acquisition moment to generate a target video frame corresponding to each acquisition moment.
[0026] Optionally, in another possible implementation of the first aspect, the synthesizing of the multiple initial video frames collected at each collection moment to generate synthesized video frames corresponding to each collection moment respectively includes:
[0027] For multiple initial video frames collected at each collection moment, obtain the brightness distribution corresponding to each initial video frame;
[0028] Determine synthesis parameters corresponding to each initial video frame according to the brightness distribution corresponding to each initial video frame;
[0029] According to the synthesis parameters, multiple initial video frames are synthesized to generate synthetic video frames corresponding to each acquisition moment, wherein the bit width of the synthetic video frame is greater than the bit width of each initial video frame.
[0030] Optionally, in yet another possible implementation of the first aspect, the tone mapping is performed on the synthetic video frame corresponding to each acquisition moment to generate a target video frame corresponding to each acquisition moment, including:
[0031] According to the adjustment operation and the brightness distribution corresponding to each initial video frame collected at each collection moment, respectively determine the global tone mapping parameters and the local tone mapping parameters of the synthetic video frame corresponding to each collection moment;
[0032] According to the global tone mapping parameters of each synthetic video frame, each synthetic video frame is subjected to global tone mapping to generate a global tone mapping video frame corresponding to each acquisition moment;
[0033] According to the local tone mapping parameters corresponding to each synthetic video frame, local tone mapping is performed on the dark part of each global tone mapping video frame to generate a target video frame corresponding to each acquisition moment.
[0034] Optionally, in yet another possible implementation of the first aspect, determining, according to the adjustment operation and the brightness distribution corresponding to each initial video frame collected at each collection moment, the global tone mapping parameters and the local tone mapping parameters of the synthesized video frame corresponding to each collection moment respectively include:
[0035] According to the adjustment operation, determining the exposure level corresponding to the adjustment operation;
[0036] According to the exposure level, determine the dark exposure value corresponding to the target video frame;
[0037] According to the dark exposure value and the brightness distribution corresponding to each initial video frame collected at each collection moment, the global tone mapping parameter and the local tone mapping parameter of each synthesized video frame are determined.
[0038] Optionally, in another possible implementation of the first aspect, after determining the video shooting parameters in response to the adjustment operation of the exposure adjustment control corresponding to HDR in the camera preview interface, the method further includes:
[0039] In response to an adjustment operation on an exposure adjustment control, determining a target dynamic range of a preview image displayed in a camera preview interface;
[0040] The dynamic range of the preview image is adjusted from the initial dynamic range to the target dynamic range with a preset step size, wherein the initial dynamic range refers to the dynamic range corresponding to the preview image before the adjustment operation occurs.
[0041] Optionally, in another possible implementation of the first aspect, before determining the video shooting parameters in response to the adjustment operation of the exposure adjustment control corresponding to HDR in the camera preview interface, the method further includes:
[0042] According to the preview image collected during the preview process, determining whether the current scene is a face scene;
[0043] When the current scene is a face scene, the default gear corresponding to the exposure adjustment control is determined as the first gear;
[0044] When the current scene is not a face scene, the default gear corresponding to the exposure adjustment control is determined to be the second gear, wherein the exposure of the first gear is higher than the exposure of the second gear.
[0045] Optionally, in yet another possible implementation of the first aspect, judging whether the current scene is a face scene according to the preview image collected during the preview process includes:
[0046] When a human face is included in the preview image and the area of the human face is greater than or equal to a third threshold, determining that the current scene is a human face scene;
[0047] When the preview image does not contain a human face or the area of the human face is smaller than the third threshold, it is determined that the current scene is not a human face scene.
[0048] Optionally, in yet another possible implementation of the first aspect, after synthesizing the multiple initial video frames acquired at each acquisition moment to generate target video frames corresponding to each acquisition moment, the method further includes:
[0049] The format of each target video frame is converted to convert the target video frame into a displayable format.
[0050] Optionally, in another possible implementation manner of the first aspect, after synthesizing the multiple initial video frames collected at each collection moment to generate target video frames corresponding to each collection moment, the method further includes:
[0051] In response to a trigger operation on an end recording control in a camera shooting interface, recording is ended and a target video is generated, wherein the target video is generated according to a target video frame corresponding to each acquisition moment.
[0052] In a second aspect, an embodiment of the present application provides a video shooting device, including: a first determination module, used to determine video shooting parameters in response to an adjustment operation of an exposure adjustment control corresponding to HDR in a camera preview interface; a first acquisition module, used to respond to a trigger operation of a recording start control, and according to the video shooting parameters, collect multiple frames of initial video frames at each acquisition moment, wherein the exposure value of each initial video frame is different; a first synthesis module, used to synthesize the multiple frames of initial video frames collected at each acquisition moment to generate a target video frame corresponding to each acquisition moment.
[0053] In a possible implementation manner of the second aspect, the apparatus further includes:
[0054] A second determination module is used to determine a current dynamic range corresponding to the current scene according to the preview image collected during the preview process;
[0055] The first display module is used to display the exposure adjustment control in the camera preview interface when the current dynamic range is greater than or equal to the first threshold.
[0056] Optionally, in another possible implementation manner of the second aspect, the video shooting parameters include a target exposure value corresponding to each initial video frame; accordingly, the first determination module includes:
[0057] A first determining unit, configured to determine, in response to an adjustment operation on an exposure adjustment control, an exposure level corresponding to the adjustment operation;
[0058] The second determining unit is used to determine the target exposure value corresponding to each initial video frame according to the exposure level.
[0059] Optionally, in yet another possible implementation manner of the second aspect, the second determining unit is specifically configured to:
[0060] Determine the current dynamic range corresponding to the current scene according to the preview image collected during the preview process;
[0061] According to the current dynamic range, determine the reference exposure value corresponding to the current scene;
[0062] Determine the proportional relationship between the reference exposure value and the target exposure value corresponding to each initial video frame according to the exposure level;
[0063] The target exposure value corresponding to each initial video frame is determined according to the reference exposure value and the proportional relationship between the reference exposure value and the target exposure value corresponding to each initial video frame.
[0064] Optionally, in yet another possible implementation manner of the second aspect, the second determining unit is further configured to:
[0065] When the exposure level is greater than the second threshold, the number of initial video frames is increased.
[0066] Optionally, in yet another possible implementation of the second aspect, the video shooting parameters include a target exposure value corresponding to each initial video frame; accordingly, the first acquisition module includes:
[0067] A first acquisition unit, used to acquire a conversion gain parameter corresponding to the image sensor;
[0068] A third determination unit is used to determine the target exposure time, target conversion gain and target analog gain corresponding to each initial video frame according to the target exposure value and conversion gain parameter corresponding to each initial video frame;
[0069] The first acquisition unit is used to acquire multiple initial video frames at each acquisition moment according to a target exposure time, a target conversion gain, and a target analog gain corresponding to each initial video frame.
[0070] Optionally, in another possible implementation of the second aspect, the first synthesis module includes:
[0071] A first synthesis unit is used to synthesize multiple initial video frames collected at each collection moment to generate synthetic video frames corresponding to each collection moment;
[0072] The tone mapping unit is used to perform tone mapping on the synthetic video frame corresponding to each acquisition moment to generate a target video frame corresponding to each acquisition moment.
[0073] Optionally, in another possible implementation of the second aspect, the first synthesis unit is specifically used to:
[0074] For multiple initial video frames collected at each collection moment, obtain the brightness distribution corresponding to each initial video frame;
[0075] Determine synthesis parameters corresponding to each initial video frame according to the brightness distribution corresponding to each initial video frame;
[0076] According to the synthesis parameters, multiple initial video frames are synthesized to generate synthetic video frames corresponding to each acquisition moment, wherein the bit width of the synthetic video frame is greater than the bit width of each initial video frame.
[0077] Optionally, in yet another possible implementation manner of the second aspect, the tone mapping unit is specifically configured to:
[0078] According to the adjustment operation and the brightness distribution corresponding to each initial video frame collected at each collection moment, respectively determine the global tone mapping parameters and the local tone mapping parameters of the synthetic video frame corresponding to each collection moment;
[0079] According to the global tone mapping parameters of each synthetic video frame, each synthetic video frame is subjected to global tone mapping to generate a global tone mapping video frame corresponding to each acquisition moment;
[0080] According to the local tone mapping parameters corresponding to each synthetic video frame, local tone mapping is performed on the dark part of each global tone mapping video frame to generate a target video frame corresponding to each acquisition moment.
[0081] Optionally, in yet another possible implementation manner of the second aspect, the tone mapping unit is further configured to:
[0082] According to the adjustment operation, determining the exposure level corresponding to the adjustment operation;
[0083] According to the exposure level, determine the dark exposure value corresponding to the target video frame;
[0084] According to the dark exposure value and the brightness distribution corresponding to each initial video frame collected at each collection moment, the global tone mapping parameter and the local tone mapping parameter of each synthesized video frame are determined.
[0085] Optionally, in another possible implementation of the second aspect, the apparatus further includes:
[0086] a third determination module, configured to determine a target dynamic range of a preview image displayed in a camera preview interface in response to an adjustment operation on the exposure adjustment control;
[0087] The first adjustment module is used to adjust the dynamic range of the preview image from an initial dynamic range to a target dynamic range with a preset step size, wherein the initial dynamic range refers to the dynamic range corresponding to the preview image before the adjustment operation occurs.
[0088] Optionally, in another possible implementation of the second aspect, the apparatus further includes:
[0089] A first judgment module is used to judge whether the current scene is a human face scene according to the preview image collected during the preview process;
[0090] A fourth determination module, configured to determine the default gear position corresponding to the exposure adjustment control as the first gear position when the current scene is a face scene;
[0091] The fifth determination module is used to determine the default gear corresponding to the exposure adjustment control as the second gear when the current scene is not a face scene, wherein the exposure of the first gear is higher than the exposure of the second gear.
[0092] Optionally, in yet another possible implementation of the second aspect, the first determination module includes:
[0093] A fourth determining unit, configured to determine that the current scene is a face scene when the preview image contains a face and the area of the face is greater than or equal to a third threshold;
[0094] The fifth determining unit is used to determine that the current scene is not a face scene when the preview image does not contain a face or the area of the face is smaller than a third threshold.
[0095] Optionally, in yet another possible implementation of the second aspect, the apparatus further includes:
[0096] The format conversion module is used to convert the format of each target video frame to convert the target video frame into a displayable format.
[0097] Optionally, in another possible implementation of the second aspect, the apparatus further includes:
[0098] The first generating module is used to end the recording and generate the target video in response to the triggering operation of the end recording control in the camera shooting interface, wherein the target video is generated according to the target video frame corresponding to each acquisition moment.
[0099] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the video shooting method as described above when executing the computer program.
[0100] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the video shooting method as described above.
[0101] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute the video shooting method as described above.
[0102] Compared with the prior art, the embodiments of the present application have the following beneficial effects: by adjusting the shooting parameters when shooting the video according to the user's adjustment operation of the exposure adjustment control, and collecting multiple frames of video frames with different exposure values for synthesis, so that the target video frame finally generated can ensure that the highlight area is not overexposed and the dark details are improved, thereby not only improving the image capture quality in the HDR scene, but also meeting the user's personalized shooting needs, and having high flexibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0103] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0104] Figure 1 is a flowchart of a video shooting method provided by an embodiment of the present application;
[0105] Figure 2 is a schematic diagram of a main interface of an electronic device provided by an embodiment of the present application;
[0106] Figure 3 is a schematic diagram of a camera preview interface of an electronic device provided by an embodiment of the present application;
[0107] Figure 4 is a schematic diagram of a camera preview interface of another electronic device provided by an embodiment of the present application;
[0108] Figure 5 is a schematic diagram of a camera preview interface of another electronic device provided by an embodiment of the present application;
[0109] Figure 6 is a schematic diagram of a recording interface of an electronic device provided by an embodiment of the present application;
[0110] Figure 7 is a schematic diagram of a recording interface of another electronic device provided in an embodiment of the present application;
[0111] Figure 8 is a schematic diagram of a camera preview interface of another electronic device provided by an embodiment of the present application;
[0112] Fig. 9 is a flowchart of a video shooting method provided by another embodiment of the present application;
[0113] Fig.10 It is a schematic diagram of exposure control for capturing multiple initial image frames provided by an embodiment of the present application;
[0114] Fig.11 is a flowchart of a video shooting method provided by yet another embodiment of the present application;
[0115] Fig.12 is a flowchart of a video shooting method provided by another embodiment of the present application;
[0116] Fig.13 It is a flowchart of an overall solution of a video shooting method provided by another embodiment of the present application;
[0117] Fig.14 is a structural schematic diagram of a video shooting device provided in an embodiment of the present application;
[0118] Fig.15 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0119] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0120] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0121] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0122] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0123] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0124] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0125] The video shooting method, device, electronic device, storage medium and computer program provided by the present application are described in detail below with reference to the accompanying drawings.
[0126] First, the technical terms involved in the embodiments of the present application are explained:
[0127] HDR scene: A shooting scene with a large difference in ambient brightness. Since the dynamic range of the photosensitive element of a digital camera is limited, when taking photos, if the ambient light is particularly strong, if the exposure is determined based on the brightness of the bright area, the weak light area will be very dark and details and layers will not be visible; if the exposure is determined based on the brightness of the weak light area, the strong light area will be overexposed.
[0128] HDR mode: Through internal processing of the machine, it suppresses the strong light part to avoid overexposure, enhances the brightness of the weak light part, makes it have a certain level, and retains certain dark details.
[0129] Automatic exposure control: The function of the camera to automatically determine the exposure value according to light adjustment; from the control process, it can be divided into several types such as aperture priority, shutter priority, hybrid priority, program control, and preset mode. Exposure value = exposure time × aperture size × sensitivity (ISO). Since the aperture size of the camera in electronic devices such as mobile phones is fixed, the automatic exposure control in mobile phones only needs to consider the exposure time and ISO value, that is, let the camera automatically configure the exposure value according to the current image information, that is, automatically configure the exposure time and ISO value. ISO is a representation of the gain value, which refers to the size of the signal gain. The gain is divided into analog gain (AnalogGain, AG), digital gain (Digital Gain) and conversion gain (Conversion Gain, CG).
[0130] High Conversion Gain (HCG): HCG is used to cope with low-light scenes. Image sensors with HCG can use more light to image while reducing readout noise; this image sensor enables the camera to image in darker environments without worrying about noise that affects image quality. HCG enables the camera to image in dark environments by preventing underexposure.
[0131] Low Conversion Gain (LCG): LCG is used to cope with bright scenes. The sensitivity of the image sensor using LCG mode is reduced. The main goal of the image sensor is to reduce image exposure. When too much light reaches the image sensor, the LCG mode can prevent the camera from overexposing.
[0132] Tone mapping: HDR images have a large dynamic range and can reflect real scenes more meticulously, but HDR images have two obvious disadvantages. First, compared with low dynamic range (LDR) images of the same size, they require larger storage space and transmission bandwidth; second, they are difficult to output. Currently, the dynamic range of most image output devices such as monitors and printers is much smaller than that of ordinary high dynamic range images. Therefore, tone mapping technology is particularly important in this context. An important aspect of HDR image processing is tone mapping, which is essentially an information compression process that maps the chroma, brightness, dynamic range, etc. of the HDR image to the standard range of LDR.
[0133] Global tone mapping: Use a spatially invariant mapping function to map all pixels in the image.
[0134] Local tone mapping: adjust the mapping function according to local pixel statistics and local pixel context.
[0135] Bayer format: The original image format inside the camera, with the suffix .raw. Image formats such as JPG and YUV are all converted from the Bayer format.
[0136] Demosaic: The most important part of image signal processing. Its main function is to convert the Bayer format image data output by the image sensor into an RGB data format that can be recognized by the human eye so that it can be output on the display device.
[0137] Figure 1 A schematic flow chart of a video shooting method provided in an embodiment of the present application is shown.
[0138] Step 101, in response to an adjustment operation of an exposure adjustment control corresponding to HDR in a camera preview interface, determining a video shooting parameter.
[0139] It should be noted that the video shooting method of the embodiment of the present application can be performed by the video shooting device of the embodiment of the present application. The video shooting device of the embodiment of the present application can be configured in any electronic device to perform the video shooting method of the embodiment of the present application. For example, the video shooting device of the embodiment of the present application can be configured in electronic devices such as mobile phones, computers, wearable devices, cameras, etc. to achieve the user's video shooting experience.
[0140] The camera preview interface may refer to the interface displayed in the display interface of the electronic device after the camera application is opened. For example, the video shooting method of the embodiment of the present application is applied to the video shooting scene. Therefore, the camera preview interface in the embodiment of the present application may refer to the interface displayed after the camera application is opened, or may refer to the interface displayed after the camera application is opened and the video recording mode option is triggered.
[0141] Among them, the exposure adjustment control may refer to a control displayed in the camera preview interface for allowing the user to adjust the exposure value during video shooting.
[0142] For example, the type of the exposure adjustment control can be an adjustable slider or a selection control containing multiple options, which is not limited in the embodiments of the present application. In actual use, the form of the exposure adjustment control can be selected according to actual needs and specific application scenarios, which is not limited in the embodiments of the present application.
[0143] The type of adjustment operation is related to the type of the exposure adjustment control. For example, if the exposure adjustment control is an adjustable slider, the adjustment operation may be a sliding operation on the adjustable slider in the exposure adjustment control; if the exposure adjustment control is a selection control containing multiple options, the adjustment operation may be a selection operation on any one of the options.
[0144] The video shooting parameters may refer to the shooting parameters used when capturing a video after the video shooting starts; different video shooting parameters may be determined by adjusting the exposure adjustment control, and different video shooting parameters may result in different exposures during the video shooting process. For example, the video shooting parameters may include parameters such as the exposure value used when capturing a video.
[0145] As a possible implementation, Figure 2 As shown, the main interface 200 of the electronic device displays a page with application icons, which may include multiple application icons (for example, weather application icon, calendar application icon, album application icon, note application icon, email application icon, application store application icon, setting application icon, etc.). A page indicator may also be displayed below the above multiple application icons to indicate the positional relationship between the currently displayed page and other pages. There are multiple application icons (for example, camera application icon 201, browser application icon, information application icon, dial application icon) below the page indicator. These application icons remain displayed when the page is switched. It can be understood that the camera application icon 201 is an icon of a camera application (i.e., a camera application). The camera application icon 201 can be used to trigger the launch of the camera application.
[0146] The electronic device may detect a trigger operation on the camera application icon 201, and in response to the trigger operation, the electronic device may display a Figure 3 The camera preview interface 300 is shown. The camera preview interface 300 is a shooting interface of the default shooting mode of the camera application, and the user can preview the image and complete the shooting on this interface.
[0147] like Figure 3 As shown, the camera preview interface 300 may include a preview window 301 , a camera mode option 302 , an album shortcut control 303 , a shutter control 304 , and a camera flip control.
[0148] The preview window 301 can be used to display a preview image. The preview image displayed in the preview window 301 is an original image captured by the camera of the electronic device based on the viewing range.
[0149] One or more shooting mode options may be displayed in the camera mode option 302. The one or more shooting mode options may include: a night scene mode option, a smart portrait mode option, a photo mode option, a video mode option 3021, and more options. It is understandable that the camera mode option 302 may also include more or fewer shooting mode options.
[0150] The album quick control 303 can be used to open the album application. After the user triggers the electronic device to open the album application through the album quick control 303, the captured images and videos can be viewed. In addition, the album quick control 303 can also display thumbnails of the captured images or videos.
[0151] As a possible implementation, the shutter control 304 can be used to trigger the camera to collect images and complete the photo operation. The terminal device can automatically return to and display the camera preview interface 300 after obtaining the user's trigger operation on the shutter control 304 and completing the photo.
[0152] As a possible implementation, triggering the video recording mode option 3021 can enter the video recording mode (ie, video shooting mode) and display the following: Figure 4 The camera preview interface 400 (video preview interface) shown in the figure has substantially the same controls as those of the camera preview interface 300, except that the camera preview interface 400 may also include a video start control 401 and an exposure adjustment control 402, and the exposure adjustment control 402 may also include an adjustable slider 4021. The video start control 401 is used to trigger the electronic device to start video recording, and the exposure adjustment control 402 is used to adjust the exposure during video recording. The adjustable slider 4021 is displayed in the "auto" position of the exposure adjustment control 402 by default. The user can increase the exposure during video shooting by sliding the adjustable slider 4021 to the left, and can decrease the exposure during video shooting by sliding the adjustable slider 4021 to the right. As another example, the exposure adjustment control is a selection control including multiple options. After the video mode option 3021 is triggered to enter the video mode, the following options may also be displayed: Figure 5 The camera preview interface 400 shown in the figure may display an exposure adjustment control 402 in addition to the video recording start control 401, wherein the exposure adjustment control 402 includes a plurality of option controls 4021, and the user may select the exposure during the video shooting process by clicking any one of the option controls 4021.
[0153] It should be noted that when the exposure adjustment control is a selection control containing multiple options, Figure 5 The number of option controls 4021 shown in is only exemplary. In actual use, the number of option controls 4021 can be determined according to actual needs and specific application scenarios. Different option controls can correspond to different dynamic ranges and exposure values, so that different video shooting parameters can be determined by selecting different option controls. In order to make the adjustment of dynamic range and exposure more flexible and accurate, more option controls can be set.
[0154] After obtaining the user's trigger operation on the video start control 401, the electronic device can display the following Figure 6 The recording interface 500 shown in FIG. The recording interface 500 includes an end recording control 501 and a pause recording control 502, as well as a continue display exposure adjustment control 503 and an adjustable slider 5031. The end recording control can be used to end recording, the pause recording control 502 can be used to pause recording, and the adjustable slider 5031 in the exposure adjustment control 503 does not allow continued operation to ensure the consistency of the dynamic range during video recording. After obtaining the user's trigger operation on the end recording control 501, the electronic device can end the recording and display the following information: Figure 4 or Figure 5 The camera preview interface 400 shown in FIG. 4 can also be displayed after obtaining the user's trigger operation on the pause recording control 502. As another example, after obtaining the user's trigger operation on the recording start control 401, the electronic device can also display the following Figure 7 The recording interface 500 shown includes an end recording control 501 and a pause recording control 502, but the exposure adjustment control 503 is no longer displayed, thereby making the dynamic range in the recording process unadjustable and avoiding the visual impact of the inoperable exposure adjustment control on the recording process.
[0155] It can be understood that the trigger operations mentioned in the embodiments of the present application may include but are not limited to touch (for example, click, etc.), voice control, gesture and other operations, and the present application does not impose any restrictions on this.
[0156] It should be noted that the types of exposure adjustment controls, display positions of exposure adjustment controls, and adjustment directions of exposure adjustment controls listed above are only exemplary and cannot be regarded as limitations of the present application. In actual use, the display position and adjustment direction of the exposure adjustment control can be set according to actual needs and specific application scenarios, such as displaying it above, below, on the left, on the right, etc. of the camera preview interface.
[0157] In an embodiment of the present application, after the user opens the camera application and clicks on the video recording mode option to enter the video recording mode, the exposure adjustment control can be displayed in the camera preview interface, and after the user's adjustment operation on the exposure adjustment control is obtained, the video shooting parameters are determined according to the stay position of the adjustment operation in the exposure adjustment control; if the user's adjustment operation on the exposure adjustment control is not obtained before the user triggers the video recording start control, the video shooting parameters can be determined according to the "automatic" gear.
[0158] For example, if the exposure adjustment control type is Figure 4When the adjustable slider 4021 is shown, the video shooting parameters can be determined according to the stop position of the adjustable slider 4021 in the exposure adjustment control 402; if the type of the exposure adjustment control is not as shown Figure 5 When selecting the control shown, the video shooting parameters can be determined according to any option control 4021 selected by the user.
[0159] As an example, suppose the exposure adjustment control is of type Figure 4 As shown in the adjustable slider, the adjustable range of the adjustable slider 4021 in the exposure adjustment control 402 is divided into multiple sub-ranges (the division of the adjustable range may be implicit to the user), and the video shooting parameters corresponding to each sub-range are preset; thus, after obtaining the adjustment operation of the exposure adjustment control 402, the sub-range in which the adjustable slider 4021 is finally located can be determined, and the video shooting parameters corresponding to the sub-range can be determined as the video shooting parameters used when recording the video.
[0160] It should be noted that when the adjustable range corresponding to the adjustable slider 4021 is divided, the number of sub-ranges obtained by the final division can be determined according to actual needs and specific application scenarios, and the embodiment of the present application does not limit this. For example, the number of sub-ranges can be 3, 5, 10, 100, and so on. It can be understood that the more sub-ranges there are, the more refined and flexible the control of video exposure and dynamic range is.
[0161] As an example, suppose the exposure adjustment control is of type Figure 5 As shown in the selection control, each option control 4021 in the exposure adjustment control 402 can correspond to different video shooting parameters respectively; thus, after obtaining the selection operation of any option control 4021 in the exposure adjustment control 402, the video shooting parameter corresponding to the option control 4021 can be determined as the video shooting parameter used when recording the video.
[0162] Furthermore, the video shooting method of the embodiment of the present application can be applied in HDR scenes. Therefore, when the shooting scene is an HDR scene, the exposure adjustment control can be displayed in the camera preview interface to prevent the highlight area from being overblown while maintaining the details and layering of the dark area, and allow the user to flexibly adjust the required exposure and dynamic range according to their own shooting needs and aesthetic habits. That is, in a possible implementation of the embodiment of the present application, before the above step 101, it can also include:
[0163] Determine the current dynamic range corresponding to the current scene according to the preview image collected during the preview process;
[0164] When the current dynamic range is greater than or equal to the first threshold, an exposure adjustment control is displayed in the camera preview interface.
[0165] The preview image may refer to an image captured by the camera before the camera application is opened but before recording is started, that is, Figure 4 or Figure 5 The image displayed in the camera preview interface 400.
[0166] The current dynamic range may refer to the difference between the maximum brightness and the minimum brightness corresponding to the current scene.
[0167] In an embodiment of the present application, the brightness distribution of the preview image collected during the preview process can be analyzed to determine the maximum brightness, that is, the minimum brightness, corresponding to all pixels in the preview image, and the difference between the maximum brightness and the minimum brightness is determined as the current dynamic range, and when the current dynamic range is greater than or equal to the first threshold, it is determined that the current dynamic range is large, so that the current scene can be determined to be an HDR scene, that is, the exposure adjustment control can be displayed in the camera preview interface, so that the user can select a suitable exposure through the exposure adjustment control to improve the video shooting quality of the HDR scene; if the current dynamic range is less than the first threshold, it can be determined that the current dynamic range is small, so that it can be determined that the current scene is not an HDR scene, and the exposure adjustment control can be not displayed in the camera preview interface to prevent the user from selecting inappropriate video shooting parameters in non-HDR scenes, which instead reduces the video quality.
[0168] It should be noted that, in actual use, the specific value of the first threshold can be determined according to actual needs and specific application scenarios, and the embodiments of the present application do not limit this.
[0169] Furthermore, in an HDR scene, the face area is usually a low-light area, and the face area is usually an area that users pay more attention to and hope to obtain a clearer shooting effect. Therefore, when the shooting scene is a face scene, the exposure can be adaptively increased to further improve the clarity of the face area of the face shooting scene and further improve the video shooting quality of the HDR scene. That is, in a possible implementation method of the embodiment of the present application, before the above step 101, it can also include:
[0170] According to the preview image collected during the preview process, determining whether the current scene is a face scene;
[0171] When the current scene is a face scene, the default gear corresponding to the exposure adjustment control is determined as the first gear;
[0172] When the current scene is not a face scene, the default gear corresponding to the exposure adjustment control is determined to be the second gear, wherein the exposure of the first gear is higher than the exposure of the second gear.
[0173] The face scene may refer to a shooting scene containing a face in the camera preview interface.
[0174] In an embodiment of the present application, during the preview process, face recognition can be performed on the collected preview image to determine whether the preview image contains a face, and based on the face recognition result, determine whether the current scene is a face scene. If the current scene is a face scene, the default gear corresponding to the exposure adjustment control can be determined as the first gear with higher exposure to increase the exposure value during video shooting, thereby ensuring the exposure of the face area and improving the details and layering of the face area; if the current scene is not a face scene, the default gear corresponding to the exposure adjustment control can be determined as the second gear with lower exposure to ensure that the highlight area is not overexposed while retaining the details and layering of the dark area. It should be noted that the default gear mentioned in the embodiment of the present application is the "automatic" gear mentioned in the aforementioned embodiment and the drawings of the specification.
[0175] For example, when the current scene is not a face scene and the user does not adjust the exposure adjustment control, the adjustable slider 4021 in the exposure adjustment control 402 may point to the following: Figure 4 When the current scene is a face scene, when the user does not adjust the exposure adjustment control, the adjustable slider 4021 in the exposure adjustment control 402 may point to the position corresponding to the "automatic" gear shown in; when the current scene is a face scene, when the user does not adjust the exposure adjustment control, the adjustable slider 4021 in the exposure adjustment control 402 may point to the position corresponding to the "automatic" gear shown in Figure 8 The position corresponding to the "automatic" gear shown in Figure 8 The exposure corresponding to the "Auto" gear in Figure 4 The exposure corresponding to the "Auto" position.
[0176] It should be noted that for face scenes and non-face scenes, the adjustment of the exposure corresponding to the "auto" gear can be as follows: Figure 4 and Figure 8 The explicit form shown may also be implicit to the user, that is, regardless of the face scene or the non-face scene, the display position of the "auto" gear in the exposure adjustment control is the same, but the corresponding actual exposure is different.
[0177] Furthermore, since an irrelevant face may enter the field of view when the user is shooting non-face scenes such as scenery, it is possible that the current scene is determined to be a face scene based on the area of the face region appearing in the preview image, so as to further improve the accuracy of face scene recognition, thereby further improving the video shooting effect of the HDR scene. That is, in a possible implementation of the embodiment of the present application, judging whether the current scene is a face scene based on the preview image collected during the preview process may include:
[0178] When a human face is included in the preview image and the area of the human face is greater than or equal to a third threshold, determining that the current scene is a human face scene;
[0179] When the preview image does not contain a human face or the area of the human face is smaller than the third threshold, it is determined that the current scene is not a human face scene.
[0180] In an embodiment of the present application, a scene with a human face as the main shooting subject may be regarded as a human face scene. It is understandable that when a user takes a human face as the main shooting subject, the area of the human face region is usually larger in the image. Therefore, in a possible implementation method of an embodiment of the present application, whether the current scene is a human face scene may be determined based on whether a human face is included in the preview image and the size of the human face area.
[0181] As a possible implementation method, if it is detected that the preview image contains a face, it can be further determined whether the area of the face is greater than or equal to a third threshold, and when the area of the face in the preview image is greater than or equal to the third threshold, it is determined that the current scene is a face scene; when the preview image does not contain a face or the area of the face is less than the third threshold, it is determined that the current scene is not a face scene.
[0182] As an example, when determining whether the area of a face is greater than or equal to a third threshold, it is possible to determine whether the actual area of the face in the preview image is greater than or equal to the third threshold; or it is possible to calculate the ratio of the area of the face to the total area of the preview image and determine whether the ratio is greater than the third threshold.
[0183] It should be noted that in actual use, the method of recognizing face scenes and the corresponding value of the third threshold can be selected according to actual needs and specific application scenarios, and the embodiments of the present application do not limit this.
[0184] Furthermore, after adjusting the exposure adjustment control, the adjusted image effect can be displayed in a gradual manner to further improve the comfort of the interface display and further enhance the user experience. That is, in a possible implementation of the embodiment of the present application, after the above step 101, it can also include:
[0185] In response to an adjustment operation on an exposure adjustment control, determining a target dynamic range of a preview image displayed in a camera preview interface;
[0186] The dynamic range of the preview image is adjusted from the initial dynamic range to the target dynamic range with a preset step size, wherein the initial dynamic range refers to the dynamic range corresponding to the preview image before the adjustment operation occurs.
[0187] The target dynamic range may refer to the dynamic range of an image captured using the video capture parameters determined according to the adjustment operation.
[0188] In the embodiment of the present application, since there may be a large difference between the target dynamic range and the initial dynamic range, especially when the user's adjustment range is large, if the preview image is directly adjusted from the initial dynamic range to the target dynamic range, the dynamic range of the camera preview interface will jump, thereby affecting the user's experience. Therefore, after the user adjusts the exposure adjustment control, multiple intermediate exposure values can be determined between the initial exposure value and the target exposure value with a preset step length according to the initial exposure value (the exposure value corresponding to the preview image before the adjustment operation occurs) and the target exposure value (the exposure value determined according to the video shooting parameters), and the initial exposure value, the multiple intermediate exposure values, and the target exposure value are used to collect preview images respectively to generate multiple frames of preview images from the initial dynamic range to the target dynamic range, and the preview images with the dynamic range of each frame changing in sequence are displayed in the camera preview interface in sequence to achieve a gradual change of the camera preview interface.
[0189] It should be noted that in actual use, the specific value of the preset step size can be determined according to actual needs and specific application scenarios, and the embodiments of the present application do not limit this.
[0190] Step 102 , in response to a triggering operation on a video recording start control, a plurality of initial video frames are collected at each collection moment according to video shooting parameters, wherein the exposure value of each initial video frame is different.
[0191] The video recording start control may be a control for starting video recording displayed in the camera preview interface, such as Figure 4 or Figure 5 The video recording start control 401 in.
[0192] It is understandable that in HDR scenes, due to the large difference in brightness of different areas within the camera's field of view, if the exposure is determined according to the brightness of the bright area, the weak light area will be very dark and details and layers will not be visible; if the exposure is determined according to the brightness of the weak light area, the strong light area will be overexposed, that is, the acquisition of a single frame image will be overexposed or underexposed. If a darker image is taken first and the dark part is brightened through post-processing, since the dark part information is compressed, some information has been lost, so it will introduce more obvious dark part artifact noise; if a brighter image is taken first and the dark part is darkened through post-processing, the highlight area will still be overexposed, and the problem of information loss will also occur.
[0193] Therefore, in the embodiment of the present application, in order to solve the above problem, two video frames with different exposure values can be collected, one frame uses a higher exposure value to retain dark detail information, and the other frame uses a lower exposure value to prevent overexposure of the highlight area, and then the two video frames are synthesized, so as to maintain the detail retention and noise controllability of the dark part at different HDR levels while keeping the highlight from being overexposed. Thus, after obtaining the trigger operation of the video start control, the video can be started, and at each acquisition moment, two initial video frames with different exposure values are collected according to the determined video shooting parameters.
[0194] It should be noted that, in actual use, the number of initial videos collected at each collection moment can be determined according to actual needs and specific application scenarios, and the embodiment of the present application does not limit this. For example, the number of initial videos collected at each collection moment can be 2 frames.
[0195] Furthermore, the exposure value of each initial video frame can be determined according to the user's adjustment operation on the exposure adjustment control, so that the exposure of the final generated video can meet the brightness adjustment of the current HDR scene, while ensuring the details and layering of the highlight area and the dark area, and meet the user's personalized selection. That is, in a possible implementation of the embodiment of the present application, the above video shooting parameters may include the target exposure value corresponding to each initial video frame; accordingly, the above step 102 may include:
[0196] Obtain the conversion gain parameters corresponding to the image sensor;
[0197] According to the target exposure value and conversion gain parameter corresponding to each initial video frame, the target exposure time, the target conversion gain and the target analog gain corresponding to each initial video frame are determined respectively;
[0198] According to the target exposure time, target conversion gain and target analog gain corresponding to each initial video frame, multiple initial video frames are collected at each collection moment.
[0199] The conversion gain parameters corresponding to the image sensor may be fixed parameters of the image sensor, and may include LCG and HCG. LCG is used to cope with bright scenes to prevent overexposure of highlight areas; HCG is used to cope with low-light scenes to prevent underexposure, so that the camera can image in dark environments. For example, the ratio of LCG to HCG of the image sensor may be a fixed value, such as LCG:HCG=1:4, or LCG:HCG=1:8, and so on.
[0200] In an embodiment of the present application, the LCG mode of the image sensor can be used to capture an initial video frame with a lower target exposure value, which is responsible for obtaining information about the highlight area to prevent overexposure of the highlight area as much as possible. The HCG mode of the image sensor can be used to capture an initial video frame with a higher target exposure value, which is responsible for obtaining information about the low-light area to brighten the dark area.
[0201] As a possible implementation method, since the exposure value of an image is related to the conversion gain (CG), analog gain (AG) and exposure time of the image sensor when acquiring the image, and the exposure value of the image is proportional to the CG, AG and exposure time, and since the LCG and HCG of the image sensor are known and fixed, the LCG can be determined as the target CG corresponding to the initial video frame with a lower target exposure value, and the HCG can be determined as the target CG of the initial video frame with a higher target exposure value; thereafter, the exposure time and AG of each initial video frame acquired can be adjusted so that the exposure value of each initial video frame reaches the target exposure value, and the determined exposure time can be determined as the target exposure time of the initial video frame, and the determined AG can be determined as the target AG of the initial video frame.
[0202] For example, assuming that LCG:HCG of the image sensor is 1:4, the number of initial video frames collected at each moment is 2, among which the initial video frame with a low target exposure value is recorded as S1, and the initial video frame with a high target exposure value is recorded as S2. The ratio of the target exposure values corresponding to S2 and S1 is 4:1, so that the target exposure time of S2 can be determined to be 1ms, the target CG=1×HCG, and the target AG=1; and the target exposure time of S1 can be determined to be T=1ms, the target CG=1×LCG, and the target AG=1. Assuming that the ratio of the target exposure values corresponding to S2 and S1 is adjusted to 8:1, the target exposure value can be adjusted by adjusting the target exposure time T or the target AG. For example, when adjusting the target AG, the target exposure time of S2 can be adjusted to 1ms, the target CG = 1×HCG, and the target AG = 2; and the target exposure time of S1 can be determined to be T = 1ms, the target CG = 1×LCG, and the target AG = 1; or, when adjusting the target exposure time, the target exposure time of S2 can be determined to be 1ms, the target CG = 1×HCG, and the target AG = 1; and the target exposure time of S1 can be determined to be T = 0.5ms, the target CG = 1×LCG, and the target AG = 1. Alternatively, the target exposure time and the target AG can be adjusted in combination to achieve the purpose of adjusting the target exposure values corresponding to S2 and S1, which is not limited in the embodiments of the present application.
[0203] In an embodiment of the present application, after determining the target exposure duration, target CG, target AG and other parameters corresponding to each initial video frame collected at each collection moment, the image sensor can be controlled to collect multiple initial video frames at each collection moment according to these parameters, so as to generate the target video frame corresponding to each collection moment through synthesis, so as to brighten the dark areas while ensuring that the highlight areas are not overexposed, thereby retaining the details and layering of the dark areas.
[0204] Step 103 , synthesizing the multiple initial video frames collected at each collection moment to generate target video frames corresponding to each collection moment.
[0205] The target video frame may refer to any video frame used to generate the recorded video.
[0206] In the embodiment of the present application, for each acquisition moment, after multiple frames of initial video frames are acquired at the acquisition moment, the multiple frames of initial video frames can be synthesized to generate a target video frame corresponding to the acquisition moment. Since one of the two initial video frames is an image with a higher exposure value and containing dark details, and the other is an image with a lower exposure value that can keep the highlights from being overexposed, the target video frame generated by synthesizing the two initial video frames can simultaneously retain the detail information of the highlight area and the dark area in the HDR scene, thereby improving the video shooting quality in the HDR scene.
[0207] Furthermore, in order to improve the degree of retention of image information, the post-processing process such as image synthesis can be processed on the original image format (Bayer format) acquired by the image sensor. Therefore, after the initial video frame is synthesized to generate the target video frame, the target video frame can also be converted into a displayable format. That is, in a possible implementation of the embodiment of the present application, after the above step 103, it can also include:
[0208] The format of each target video frame is converted to convert the target video frame into a displayable format.
[0209] The displayable format may be RGB format, JPG format, YUV format, etc., and the embodiment of the present application limits this step. For example, in a video recording scenario, the target video frame may be converted into a YUV format.
[0210] In the embodiment of the present application, after the image is converted into a displayable format such as YUV format, the original image data collected by the image sensor has been compressed to a certain extent, resulting in the loss of some information, especially the loss of detail information in dark areas is relatively serious. Therefore, in the embodiment of the present application, the initial video frame can be post-processed in the Bayer domain, and the processed target video frame can be converted into a displayable format to prevent the loss of image details and the introduction of artifact noise.
[0211] As a possible implementation method, the target video frame in the Bayer format may be converted into an RGB format by demosaic processing, and then the target video frame in the RGB format may be converted into a target video frame in a YUV format.
[0212] It should be noted that the above examples are only exemplary and cannot be regarded as limiting the present application. In actual use, the method of converting the target video frame from the Bayer format to a displayable format can be selected according to actual needs and specific application scenarios, and the present application embodiment does not limit this.
[0213] Furthermore, during the video recording process, the recording can be stopped at any time according to the user operation, and the recorded target video is generated according to the target video frame corresponding to each acquisition moment generated during the recording process. That is, in a possible implementation of the embodiment of the present application, after the above step 103, the following may also be included:
[0214] In response to a trigger operation on an end recording control in a camera shooting interface, recording is ended and a target video is generated, wherein the target video is generated based on a target video frame corresponding to each of the acquisition moments.
[0215] In the embodiments of the present application, Figure 6 As shown, after obtaining a trigger operation on the end recording control 501 in the recording interface 500, the video recording can be stopped, and a target video can be generated according to the target video frames generated at each acquisition moment during the recording process.
[0216] It should be noted that the target video frame used to generate the target video may be a target video frame that has been converted into a displayable format.
[0217] The video shooting method provided in the embodiment of the present application determines the video shooting parameters by responding to the adjustment operation of the exposure adjustment control in the camera preview interface, and responds to the trigger operation of the video recording start control. According to the video shooting parameters, multiple frames of initial video frames with different exposure values are collected at each acquisition moment, and then the multiple frames of initial video frames collected at each acquisition moment are synthesized to generate target video frames corresponding to each acquisition moment. Therefore, by adjusting the shooting parameters when shooting the video according to the user's adjustment operation of the exposure adjustment control, and collecting multiple frames of video frames with different exposure values for synthesis, the target video frame finally generated can ensure that the highlight area is not overexposed and the dark details are improved, thereby not only improving the image shooting quality in the HDR scene, but also meeting the personalized shooting needs of the user, and having high flexibility.
[0218] Combine the following Fig. 9 , the video shooting method provided in the embodiment of the present application is further explained.
[0219] Fig. 9 A schematic diagram of a process flow of another video shooting method provided in an embodiment of the present application is shown.
[0220] like Fig. 9 As shown, the video shooting method comprises the following steps:
[0221] Step 901, in response to an adjustment operation on an exposure adjustment control, determining an exposure level corresponding to the adjustment operation.
[0222] Among them, the exposure level can be determined according to the final stop position of the adjustment operation in the exposure adjustment control; the exposure level can be used to represent the exposure value level of the dark area determined by the adjustment operation and expected to be achieved.
[0223] For example, if the exposure adjustment control type is Figure 4 When the adjustable slider 4021 is used as shown, the exposure level can be determined according to the position of the adjustable slider 4021 in the exposure adjustment control 402. Figure 5 When the selection control is shown, the exposure level can be determined based on any option control 4021 selected by the user.
[0224] As an example, suppose the exposure adjustment control is of type Figure 4As shown in the adjustable slider, the adjustable range of the adjustable slider 4021 in the exposure adjustment control 402 is divided into multiple sub-ranges (the division of the adjustable range may be implicit to the user), and the exposure level corresponding to each sub-range is preset; thus, after obtaining the adjustment operation of the exposure adjustment control 402, the sub-range in which the adjustable slider 4021 is finally located can be determined, and the exposure level corresponding to the sub-range can be determined as the selected exposure level.
[0225] It should be noted that when the adjustable range corresponding to the adjustable slider 4021 is divided, the number of sub-ranges obtained by the final division can be determined according to actual needs and specific application scenarios, and the embodiment of the present application does not limit this. For example, the number of sub-ranges can be 3, 5, 10, 100, and so on. It can be understood that the more sub-ranges there are, the more refined and flexible the control of video exposure and dynamic range is.
[0226] As an example, suppose the exposure adjustment control is of type Figure 5 As shown in the selection control, each option control 4021 in the exposure adjustment control 402 can correspond to a different exposure level respectively; thus, after obtaining the selection operation of any option control 4021 in the exposure adjustment control 402, the exposure level corresponding to the option control 4021 can be determined as the selected exposure level.
[0227] Step 902: Determine the target exposure value corresponding to each initial video frame according to the exposure level.
[0228] In an embodiment of the present application, the target exposure value corresponding to each initial video frame can be preset at each exposure level, so that according to the determined exposure level, the exposure value of each initial video frame corresponding to the exposure level can be determined as the target exposure value corresponding to each initial video frame used in the current recording.
[0229] Furthermore, since different dynamic ranges of scenes have different exposure values, the exposure value that allows the current scene to be safely exposed can be determined based on the dynamic range of the current scene, and then the actual exposure value of each initial video frame can be determined with reference to the exposure value, so that the exposure value during video shooting can better match the dynamic range of the current shooting scene, so as to further preserve the details of the dark area and suppress noise. That is, in a possible implementation of the embodiment of the present application, the above step 902 may include:
[0230] Determine the current dynamic range corresponding to the current scene according to the preview image collected during the preview process;
[0231] According to the current dynamic range, determine the reference exposure value corresponding to the current scene;
[0232] Determine the proportional relationship between the reference exposure value and the target exposure value corresponding to each initial video frame according to the exposure level;
[0233] The target exposure value corresponding to each initial video frame is determined according to the reference exposure value and the proportional relationship between the reference exposure value and the target exposure value corresponding to each initial video frame.
[0234] The current dynamic range may refer to the difference between the maximum brightness and the minimum brightness corresponding to the current scene.
[0235] The reference exposure value may refer to an exposure value that can safely expose the captured image within the dynamic range of the current scene. In actual use, the appropriate reference exposure value corresponding to each dynamic range may be determined based on experience or experimental results, and the corresponding relationship between the dynamic range and the exposure value may be preset.
[0236] In the embodiment of the present application, the brightness distribution of the preview image collected during the preview process can be analyzed to determine the maximum brightness or the minimum brightness corresponding to all pixels in the preview image, and the difference between the maximum brightness and the minimum brightness can be determined as the current dynamic range. Afterwards, the exposure value corresponding to the current dynamic range can be determined as the reference exposure value corresponding to the current scene according to the correspondence between the preset dynamic range and the exposure value.
[0237] As a possible implementation, the target exposure value of the multiple frames of initial video frames collected at each collection moment may not be an absolute value, but a relative value relative to the reference exposure value. Since the reference exposure value is an exposure value that can obtain safe exposure under the current dynamic range determined according to the current scene, therefore, determining the target exposure value corresponding to each frame of the initial video frame according to the reference exposure value can better prevent the highlight area from being overexposed, and can better retain the dark details, and suppress the noise introduced when the dark part is brightened, further improving the video shooting quality under the HDR scene. Therefore, the proportional relationship between the reference exposure value and the target exposure value corresponding to each frame of the initial image frame under each exposure gear can be preset in advance, so that after determining the exposure gear and the reference exposure value, the proportional relationship between the reference exposure value and the target exposure value corresponding to each frame of the initial image frame under the exposure gear can be determined; and then the target exposure value corresponding to each frame of the initial video frame can be determined according to the reference exposure value and the proportional relationship between the reference exposure value and the target exposure value corresponding to each frame of the initial video frame.
[0238] As an example, assuming that the number of initial video frames collected at each acquisition moment is 2, the initial video frame with a high exposure value is recorded as S2, and the initial video frame with a low exposure value is recorded as S1. assuming that the ratio between the reference exposure value and the target exposure value corresponding to S2 is 4, and the ratio between the reference exposure value and the target exposure value corresponding to S1 is 16, and the reference exposure value is N, then it can be determined that the target exposure value corresponding to S2 is N / 4, and the target exposure value corresponding to S1 is N / 16.
[0239] For example, assuming that the number of initial video frames collected at each acquisition moment is 2, the initial video frame with a high exposure value is recorded as S2, and the initial video frame with a low exposure value is recorded as S1, and the adjustable range of the exposure adjustment control includes four exposure gears, namely, "low", "automatic", "high" and "very high", and the proportional relationship between the reference exposure value in each gear and the target exposure value corresponding to S2 and S1 is as follows: Fig.10 As shown. Among them, safe represents the reference exposure value, long represents the exposure value that the dark part of the image is expected to reach, the number between the reference exposure value safe and S2 represents the proportional relationship between the two, and the number between S2 and S1 represents the proportional relationship between the two. Fig.10 In the figure, the higher the exposure value is, the lower the exposure value is, that is, in each gear, the reference exposure value safe is greater than the target exposure value corresponding to S2, and the target exposure value corresponding to S2 is greater than the target exposure value corresponding to S1. In the same shooting scene, since the current dynamic range is already determined, the reference exposure value safe is also fixed, and the target exposure value corresponding to S1 is also fixed in each gear, so that the target exposure value corresponding to S1 is always at a low level to prevent the highlight area from being overexposed, that is, the proportional relationship between the reference exposure value safe and the target exposure value corresponding to S1 is fixed, that is, in each gear, the reference exposure value safe is the target exposure value corresponding to S1. The reference exposure value safe is 16 times the target exposure value corresponding to S2; in the "low" gear, the reference exposure value safe is 4 times the target exposure value corresponding to S2, that is, the target exposure value corresponding to S2 is 4 times the target exposure value corresponding to S1; in the "automatic" gear, the reference exposure value safe is 4 times the target exposure value corresponding to S2, that is, the target exposure value corresponding to S2 is 4 times the target exposure value corresponding to S1; in the "high" gear, the reference exposure value safe is 2 times the target exposure value corresponding to S2, that is, the target exposure value corresponding to S2 is 8 times the target exposure value corresponding to S1; in the "very high" gear, the reference exposure value safe is 2 times the target exposure value corresponding to S2, that is, the target exposure value corresponding to S2 is 8 times the target exposure value corresponding to S1. From Fig.10It can be seen that when the exposure level is increased, the target exposure corresponding to S2 also shows an overall upward trend, so that the exposure value of the dark part can be closer to the exposure value required by the user, thereby improving the signal-to-noise ratio of the dark part and further improving the details of the dark part.
[0240] It should be noted that the above examples are only exemplary and cannot be regarded as limitations of the present application. In actual use, the number of gears included in the adjustable range of the exposure adjustment control and the proportional relationship between the reference exposure value corresponding to each gear and the target exposure value corresponding to each initial video frame can be determined according to actual needs and specific application scenarios. The present application embodiment does not limit this.
[0241] Furthermore, when the exposure level is large, that is, when the exposure value of the dark part is expected to be high, more video frames with higher exposure values can be collected to further enhance the dark details and suppress the noise introduced in the post-processing stage. That is, in a possible implementation of the embodiment of the present application, before determining the proportional relationship between each initial video frame and the reference exposure value according to the exposure level, the following may also be included:
[0242] When the exposure level is greater than the second threshold, the number of initial video frames is increased.
[0243] As a possible implementation method, if the exposure level is greater than the second threshold, it can be determined that the exposure value of the dark area of the image required by the exposure level is higher. Therefore, more frames of initial video frames can be collected to improve the brightness of the dark area, and the newly added initial video frames can be assigned a higher target exposure value to prevent the introduction of too much noise in the subsequent brightening process of the dark area due to the large difference between the initial video frame and the expected dark exposure value, thereby affecting the detail retention of the dark area.
[0244] For example, if Fig.10 As shown, the second threshold value can be set to the "high" gear, so when the exposure gear is the "very high" gear, it can be determined that the exposure gear is greater than the second threshold value, so that the number of initial image frames can be increased from 2 frames to 3 frames, and the target exposure value corresponding to the newly added third original video frame (i.e., S3) is determined to be safe (i.e., the ratio between the reference exposure value safe and the target exposure value corresponding to S3 is 1), so that the exposure value corresponding to S3 is closer to the expected dark exposure value long, so as to further improve the original exposure value of the dark part of the image through S3, so that there is no need to significantly brighten the dark part when brightening the dark part in the later stage, so as to avoid introducing too much noise.
[0245] It can be understood that, for the exposure level that requires increasing the number of initial video frames, the correspondence between the corresponding reference exposure value and the target exposure value corresponding to the initial video frame includes the correspondence between the newly added original video frames and the reference exposure value.
[0246] It should be noted that the above examples are only exemplary and cannot be regarded as limitations of the present application. In actual use, the specific value of the second threshold value and the number of newly added original video frames, as well as the proportional relationship between the target exposure value and the reference exposure value of the newly added original video frames can be determined according to actual needs and specific application scenarios, and the embodiments of the present application do not limit this.
[0247] Step 903 , in response to the triggering operation of the video recording start control, a plurality of initial video frames are collected at each collection time according to the target exposure value corresponding to each initial video frame.
[0248] Step 904 , synthesizing the multiple initial video frames collected at each collection moment to generate target video frames corresponding to each collection moment.
[0249] The specific implementation process and principle of the above steps 903-904 can refer to the detailed description of the above embodiment, which will not be repeated here.
[0250] The video shooting method provided in the embodiment of the present application determines a reference exposure value corresponding to the current scene according to the exposure level corresponding to the adjustment operation of the exposure adjustment control and the current dynamic range corresponding to the current scene, and then determines the proportional relationship between the reference exposure value and the target exposure value corresponding to each initial video frame according to the exposure level, and determines the target exposure value corresponding to each initial video frame according to the reference exposure value and the proportional relationship between the reference exposure value and the target exposure value corresponding to each initial video frame, and then responds to the trigger operation of the recording start control, according to the target exposure value corresponding to each initial video frame, collects multiple frames of initial video frames at each collection time, and finally synthesizes the multiple frames of initial video frames collected at each collection time to generate the target video frames corresponding to each collection time. Therefore, by adjusting the exposure value when shooting the video according to the user's adjustment operation of the exposure adjustment control and the dynamic range of the current scene, and collecting multiple video frames with different exposure values for synthesis, the final generated target video frame can ensure that the highlight area is not overexposed and the dark details are enhanced. This not only meets the user's personalized shooting needs and has high flexibility, but also makes the exposure value of the video more matched with the dynamic range of the shooting scene, further improving the image capture quality in the HDR scene.
[0251] Combine the following Fig.11 , the video shooting method provided in the embodiment of the present application is further explained.
[0252] Fig.11 A flow chart of another video shooting method provided in an embodiment of the present application is shown.
[0253] like Fig.11 As shown, the video shooting method comprises the following steps:
[0254] Step 1101, in response to an adjustment operation on an exposure adjustment control corresponding to HDR in a camera preview interface, determining a video shooting parameter.
[0255] Step 1102 , in response to a triggering operation on a video recording start control, a plurality of initial video frames are collected at each collection moment according to video shooting parameters, wherein the exposure value of each initial video frame is different.
[0256] The specific implementation process and principle of the above steps 1101-1102 can refer to the detailed description of the above embodiment and will not be repeated here.
[0257] Step 1103 , synthesizing the multiple initial video frames collected at each collection moment to generate synthetic video frames corresponding to each collection moment.
[0258] In the embodiments of the present application, since images in displayable formats such as YUV are usually low-bit width data of 10 bits (i.e., the brightness, chromaticity and other information of each pixel are represented by a 10-bit space), and since the low-bit width image data has lost some information, if post-processing operations such as dark area brightening are performed on the low-bit width image data, more obvious artifact noise will be introduced. Therefore, for multiple frames of initial video frames acquired at an acquisition moment, the multiple frames of initial video frames can be synthesized in the Bayer domain to generate a synthesized video frame corresponding to the acquisition moment, and the synthesized video frame is still image data in the Bayer format, thereby preventing data loss during the image data compression process, and further ensuring that the dark details can be retained as much as possible when the dark areas are brightened, thereby enhancing the layering of the dark areas.
[0259] Furthermore, in order to prevent image information loss, multiple frames of initial video frame images with lower bit widths may be synthesized into a synthesized video frame with higher bit widths during synthesis processing, so that the synthesized video frame can contain all information of highlights and dark parts. That is, in a possible implementation of the embodiment of the present application, the above step 1103 may include:
[0260] For multiple initial video frames collected at each collection moment, obtain the brightness distribution corresponding to each initial video frame;
[0261] Determine synthesis parameters corresponding to each initial video frame according to the brightness distribution corresponding to each initial video frame;
[0262] According to the synthesis parameters, multiple initial video frames are synthesized to generate synthetic video frames corresponding to each acquisition moment, wherein the bit width of the synthetic video frame is greater than the bit width of each initial video frame.
[0263] As a possible implementation method, for multiple frames of initial video frames collected at a collection moment, the brightness distribution of each frame of the initial video frame can be obtained, and based on the brightness distribution corresponding to each frame of the initial video frame, the repeated bit width required to represent the repeated brightness distribution corresponding to each frame of the initial video frame is determined, and then based on the repeated bit width corresponding to each frame of the initial video frame, the synthesis parameters and the bit width of the synthesized video frame are determined, and then the initial video frames are synthesized according to the determined synthesis parameters to generate the synthesized video frame corresponding to the collection moment.
[0264] For example, assuming that the number of initial video frames collected at each acquisition moment is 2, and the two initial video frames are respectively recorded as S1 and S2, if S1 and S2 are both 12-bit Bayer images, and the repeated brightness distribution of S1 and S2 occupies a total of 4 bits of width, then it can be determined that the bit width of the composite video frame is 12+4=16 bits, and corresponding synthesis parameters can be generated based on these data to perform synthesis processing on S1 and S2 to generate composite video frames corresponding to S1 and S2.
[0265] For another example, assuming that the number of initial video frames collected at each collection moment is 3, and the three initial video frames are respectively recorded as S1, S2 and S3, if S1 and S2 are both 12-bit Bayer images, and the repeated brightness distribution of S1 and S2 occupies a total of 4 bits, then it can be determined that the bit width of the synthetic video frame corresponding to S1 and S2 is 12+4=16 bits, so that synthesis parameters for synthesizing S1 and S2 can be generated according to these parameters, and the synthesis parameters are used to synthesize S1 and S2 to generate synthetic video frames corresponding to S1 and S2; Afterwards, it can be determined that the repeated brightness distribution of the composite video frames corresponding to S1 and S2 and S3 occupies 2 bits of width based on the brightness distribution of the composite video frames corresponding to S1 and S2 and the brightness distribution of S3. It can then be determined that the bit width of the composite video frames corresponding to S1, S2 and S3 is 16+2=18 bits, and synthesis parameters between the composite video frames corresponding to S1 and S2 and S3 can be generated based on these data. The composite video frames corresponding to S1 and S2 and S3 are synthesized using the synthesis parameters to generate composite video frames corresponding to S1, S2 and S3.
[0266] It should be noted that when the number of initial video frames is larger, it is also possible to first generate a composite video frame corresponding to two initial video frames in accordance with the above-mentioned method, and then synthesize the generated composite video frame with other initial video frames until all the initial video frames are synthesized.
[0267] Step 1104 , tone mapping is performed on the synthetic video frame corresponding to each acquisition moment to generate a target video frame corresponding to each acquisition moment.
[0268] In an embodiment of the present application, since the synthetic video frames corresponding to each acquisition moment are Bayer images with a high bit width and contain all the information of the highlights and dark areas, after generating a synthetic video frame corresponding to a capture moment, the synthetic video frame can be tone mapped to adjust the dynamic range of the synthetic video frame to the range that can be displayed by the electronic device, and the dark area of the synthetic video frame is brightened, the brightness of the dark area of the synthetic video frame is adjusted to the desired exposure value, and the tone mapping operation is performed on the Bayer image with a high bit width, which can not only adjust the brightness and detail information of the dark area to the desired level, but also suppress the noise introduced when the dark area is brightened as much as possible.
[0269] Furthermore, the synthesized video frame may be first subjected to global tone mapping, and then the dark area may be subjected to local tone mapping, so as to further enhance the brightening effect and detail retention of dark details. That is, in a possible implementation of the embodiment of the present application, the above step 1104 may include:
[0270] According to the adjustment operation and the brightness distribution corresponding to each initial video frame collected at each collection moment, respectively determine the global tone mapping parameters and the local tone mapping parameters of the synthetic video frame corresponding to each collection moment;
[0271] According to the global tone mapping parameters of each synthetic video frame, each synthetic video frame is subjected to global tone mapping to generate a global tone mapping video frame corresponding to each acquisition moment;
[0272] According to the local tone mapping parameters corresponding to each synthetic video frame, local tone mapping is performed on the dark part of each global tone mapping video frame to generate a target video frame corresponding to each acquisition moment.
[0273] The global tone mapping parameters may refer to parameters used when performing global tone mapping on the synthesized video frame; and the local tone mapping parameters may refer to parameters used when performing local tone mapping on the synthesized video frame.
[0274] As a possible implementation method, since the user can adjust the desired dark exposure value by adjusting the exposure adjustment control, and the global tone mapping and local tone mapping of the synthesized video frame are performed to brighten the dark brightness of the synthesized video frame to the desired dark exposure value, when performing global tone mapping and local tone mapping, it is necessary to know not only the desired dark exposure value but also the brightness distribution of the initial video frame. Therefore, the desired dark exposure value (i.e. Fig.10 long), for a capture moment, the global tone mapping parameters and local tone mapping parameters of the composite video frame corresponding to the capture moment can be determined according to the dark exposure value and the brightness distribution corresponding to each frame of the initial video frame captured at the capture moment. Then, the composite video frame can be subjected to global tone mapping processing according to the determined global tone mapping parameters to adjust the dynamic range of the composite video frame to the display range of the electrical device, and preliminarily improve the brightness of the middle and dark parts of the composite video frame to generate the global tone mapping video frame corresponding to the capture moment; thereafter, the dark part of the generated global tone mapping video frame can be identified, and according to the determined local tone mapping parameters, the dark part of the global tone mapping video frame corresponding to the capture moment can continue to be subjected to local tone mapping processing to adjust the brightness of the dark part of the global tone mapping video frame to the desired dark exposure value, thereby generating the target video frame corresponding to the capture moment.
[0275] It should be noted that when performing local tone mapping on dark areas, the area with a brightness value less than a brightness threshold can be determined as a dark area based on the brightness of each pixel in the global tone mapping video frame, and local tone mapping processing can be performed on the identified dark areas to adjust the dark areas of the target video frame to the desired exposure value.
[0276] Furthermore, different exposure levels may correspond to different dark exposure values, and therefore, the dark exposure value may be determined according to the exposure level corresponding to the adjustment operation, thereby determining the global tone mapping parameters and the local tone mapping parameters. That is, in a possible implementation of the embodiment of the present application, the above-mentioned determination of the global tone mapping parameters and the local tone mapping parameters of the synthesized video frame corresponding to each acquisition moment according to the adjustment operation and the brightness distribution corresponding to each initial video frame acquired at each acquisition moment may include:
[0277] According to the adjustment operation, determining the exposure level corresponding to the adjustment operation;
[0278] According to the exposure level, determine the dark exposure value corresponding to the target video frame;
[0279] According to the dark exposure value and the brightness distribution corresponding to each initial video frame collected at each collection moment, the global tone mapping parameter and the local tone mapping parameter of each synthesized video frame are determined.
[0280] As an example, suppose the exposure adjustment control is of type Figure 5 As shown in the selection control, each option control 4021 in the exposure adjustment control 402 can correspond to a different exposure gear; thus, after obtaining the selection operation of any option control 4021 in the exposure adjustment control 402, the exposure gear corresponding to the option control 4021 can be determined as the selected exposure gear. Afterwards, the current dynamic range corresponding to the current scene can be determined according to the preview image collected during the preview process, and the reference exposure value corresponding to the current scene can be determined according to the current dynamic range, and the proportional relationship between the reference exposure value and the dark exposure value can be determined according to the exposure gear, and then the dark exposure value can be determined according to the reference exposure value and the proportional relationship between the reference exposure value and the dark exposure value. Finally, the global tone mapping parameters and local tone mapping parameters of the synthetic video frame corresponding to the acquisition moment can be determined according to the determined dark exposure value and the brightness distribution corresponding to each initial video frame collected at a certain acquisition moment.
[0281] For example, assuming that the number of initial video frames collected at each acquisition moment is 2, the initial video frame with a high exposure value is recorded as S2, and the initial video frame with a low exposure value is recorded as S1, and the adjustable range of the exposure adjustment control includes four exposure gears, namely, "low", "automatic", "high" and "very high", the proportional relationship between the reference exposure value in each gear and the target exposure values corresponding to S2 and S1, and the proportional relationship between the dark exposure value and the reference exposure value in each gear are as follows: Fig.10 As shown. Among them, safe represents the reference exposure value, long represents the dark exposure value, and the number between the dark exposure value long and the reference exposure value safe represents the proportional relationship between the two. Fig.10 In the above, the higher the exposure value is, the lower the exposure value is. In the same shooting scene, since the current dynamic range is already determined, the reference exposure value safe is also fixed. In the "low" gear, the dark exposure value long is 1 / 2 times the reference exposure value safe; in the "auto" gear, the dark exposure value long is equal to the reference exposure value; in the "high" gear, the dark exposure value long is 2 times the reference exposure value safe; in the "very high" gear, the dark exposure value long is 4 times the reference exposure value safe. From Fig.10It can be seen that when the exposure gear is increased, the target exposure corresponding to S2 also shows an overall upward trend, so that the exposure value of the dark part can be closer to the exposure value required by the user, thereby improving the signal-to-noise ratio of the dark part and further improving the details of the dark part. It should be noted that in the "very high" gear, due to the large difference in exposure value between S2 and the dark part exposure value long, it is easy to introduce more noise when brightening the dark part directly according to S2. Therefore, the third frame initial video frame S3 with a collection exposure value closer to the dark part exposure value long can be added to suppress the noise when brightening the dark part.
[0282] It should be noted that the above examples are only exemplary and cannot be regarded as limitations of the present application. In actual use, the number of gears included in the adjustable range of the exposure adjustment control and the proportional relationship between the corresponding reference exposure value and the dark exposure value in each gear can be determined according to actual needs and specific application scenarios, and the present application embodiment does not limit this.
[0283] The video shooting method provided in the embodiment of the present application determines the video shooting parameters by responding to the adjustment operation of the exposure adjustment control corresponding to HDR in the camera preview interface, and responding to the trigger operation of the recording start control, according to the video shooting parameters, collects multiple frames of initial video frames with different exposure values at each acquisition moment, and then synthesizes the multiple frames of initial video frames collected at each acquisition moment to generate synthetic video frames corresponding to each acquisition moment, and then performs tone mapping on the synthetic video frames corresponding to each acquisition moment to generate target video frames corresponding to each acquisition moment. Thus, by adjusting the exposure value and dark exposure value when shooting the video according to the user's adjustment operation of the exposure adjustment control and the dynamic range of the current scene, and collecting multiple frames of video frames with different exposure values for synthesis and tone mapping, the brightness of the dark part of the video frame is adjusted to the level defined by the dark exposure value, so that the target video frame finally generated can ensure that the highlight area is not overexposed and the dark details are improved, thereby not only meeting the personalized shooting needs of the user, but also being highly flexible, and making the exposure value of the video more compatible with the dynamic range of the shooting scene, further improving the image shooting quality in the HDR scene.
[0284] Combine the following Fig.12 , the video shooting method provided in the embodiment of the present application is further explained.
[0285] Fig.12 A flow chart of another video shooting method provided in an embodiment of the present application is shown.
[0286] like Fig.12 As shown, the video shooting method comprises the following steps:
[0287] Step 1201, determining a current dynamic range corresponding to the current scene according to the preview image collected during the preview process.
[0288] Step 1202: When the current dynamic range is greater than or equal to the first threshold, an exposure adjustment control corresponding to HDR is displayed in the camera preview interface.
[0289] Step 1203, in response to an adjustment operation on the exposure adjustment control, determining an exposure level corresponding to the adjustment operation.
[0290] Step 1204: Determine a reference exposure value corresponding to the current scene according to the current dynamic range.
[0291] Step 1205 , determining the proportional relationship between the reference exposure value and the target exposure value corresponding to each initial video frame, and the proportional relationship between the dark exposure values corresponding to the reference exposure value, according to the exposure level.
[0292] Step 1206 , determining the target exposure value corresponding to each initial video frame according to the reference exposure value and the proportional relationship between the reference exposure value and the target exposure value corresponding to each initial video frame.
[0293] Step 1207, determining the dark portion exposure value according to the reference exposure value and the proportional relationship between the reference exposure value and the dark portion exposure value.
[0294] like Fig.10 As shown, "Auto" gear: When the user does not make any adjustments, the default "Auto" gear is used. Long is equal to safe, and no additional dark adjustment is made. There is a certain difference in exposure value between S1, S2 and safe, and the HDR effect is moderate.
[0295] "High" gear: When the user adjusts to the "high" direction, the exposure value difference between S2 and safe can be reduced (for example, from 4, 3.9, 3.8... gradually reduced to 2, that is, the preview image is displayed in a dynamic range gradient) to obtain better dark details, and then S2 is brightened in the dark, but the exposure value difference between long and S2 is controlled within a certain range. At the same time, the exposure value difference between S1 and S2 is expanded (for example, from 4, 4.1, 4.2... gradually expanded to 8, that is, the preview image is displayed in a dynamic range gradient), and the degree of information retention for highlight overexposure protection remains unchanged.
[0296] "Very high" gear: When the user further adjusts in the "high" direction, the exposure value difference between long and S2 increases further, for example, gradually expands from 2, 2.1, 2.2... to 4), until the image sensor needs to capture the third initial video frame S3. In this way, a certain exposure value difference is maintained between S1, S2, S3 and safe, and S3 replaces S2 to brighten the dark part to achieve the brightness required by long.
[0297] "Low" gear: When the user adjusts to the low direction, the exposure values of S1 and S2 remain unchanged. However, the dark part of S2 is darkened to achieve the brightness required by long.
[0298] Step 1208 , in response to the triggering operation of the video recording start control, a plurality of initial video frames are collected at each collection time according to the target exposure value corresponding to each initial video frame.
[0299] Step 1209 , synthesizing the multiple initial video frames collected at each collection moment to generate synthetic video frames corresponding to each collection moment.
[0300] Step 1210 , according to the dark exposure value and the brightness distribution corresponding to each initial video frame collected at each collection moment, respectively determine the global tone mapping parameters and the local tone mapping parameters of the synthesized video frame corresponding to each collection moment.
[0301] Step 1211 , performing global tone mapping on each synthetic video frame according to the global tone mapping parameters of each synthetic video frame, so as to generate a global tone mapped video frame corresponding to each acquisition moment.
[0302] Step 1212 , according to the local tone mapping parameters corresponding to each synthetic video frame, local tone mapping is performed on the dark part of each global tone mapping video frame to generate a target video frame corresponding to each acquisition moment.
[0303] It should be noted that other specific implementation processes and principles of the embodiments of the present application can refer to the detailed description of the above embodiments and will not be repeated here.
[0304] Combine the following Fig.13 , the video shooting method provided in the embodiment of the present application is further explained.
[0305] Fig.13 A schematic flow chart of an overall solution of a video shooting method provided in an embodiment of the present application is shown.
[0306] like Fig.13As shown, taking the acquisition of 2 initial video frames at each acquisition moment as an example, the user's adjustment operation refers to the adjustment operation of the exposure adjustment control in the above embodiment, the perception engine can obtain the preview image acquired during the preview process from the image processor front end to determine the current dynamic range corresponding to the current scene, and then the automatic exposure control module determines the reference exposure value safe according to the current dynamic range obtained from the perception engine, and determines the target exposure values of the initial video frames S1 and S2 according to the exposure gear selected by the user's adjustment operation and the reference exposure value safe, and according to the exposure values of the initial video frames S1 and S2, Determine the exposure duration, CG, AG and other parameters corresponding to the initial video frames S1 and S2, and control the image sensor to respectively collect the initial video frames S1 and S2 according to the exposure duration, CG, AG and other parameters corresponding to the initial videos S1 and S2, wherein the initial video frames are all original image data in Bayer format, and the bit width is 12b (i.e., 12 bits); then, synthesize the initial video frames S1 and S2 through the sensor front-end processor to generate a synthesized video frame in Bayer format with a high bit width, for example, the bit width of the synthesized video frame can be 18b (i.e., 18 bits).
[0307] Afterwards, the tone mapping control module determines the dark exposure value (i.e. Fig.10 long in the image processor), and determine the global tone mapping parameters and the local tone mapping parameters according to the statistical information (such as brightness distribution information, etc.) of the initial video frames S1 and S2 obtained by the automatic exposure control module from the sensor front-end processor, and perform global tone mapping and local tone mapping processing on the synthesized video frame in the Bayer domain in the image processor front end, and then perform Demosaic processing on the Bayer image after the global tone mapping and local tone mapping processing to convert the Bayer image into a 14b RGB image, and then convert the RGB image into a 10b YUV format image, and then process and display the generated YUV format image processor back end. It should be noted that if the synthesized video frame has been subjected to local tone mapping processing in the image processor front end, it is not necessary to perform local tone mapping processing on the YUV image in the image processor back end; if the synthesized video frame has not been subjected to local tone mapping processing in the image processor front end, the generated YUV image can be subjected to local tone mapping processing in the image processor back end to adjust the dark brightness of the image frame, so as to adjust the dark brightness of the image frame to the dark exposure value selected by the user.
[0308] It should be noted that other specific implementation processes and principles of the embodiments of the present application can refer to the detailed description of the above embodiments and will not be repeated here.
[0309] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0310] Corresponding to the video shooting method described in the above embodiment, Fig.14 A structural block diagram of a video shooting device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0311] Reference Fig.14 , the device 1400, comprises:
[0312] A first determination module 1401 is used to determine video shooting parameters in response to an adjustment operation of an exposure adjustment control corresponding to HDR in a camera preview interface;
[0313] The first acquisition module 1402 is used for responding to the triggering operation of the video recording start control, and acquiring multiple initial video frames at each acquisition moment according to the video shooting parameters, wherein the exposure value of each initial video frame is different;
[0314] The first synthesis module 1403 is used to synthesize multiple initial video frames collected at each collection moment to generate target video frames corresponding to each collection moment.
[0315] In actual use, the video shooting device provided in the embodiment of the present application can be configured in any electronic device to execute the aforementioned video shooting method.
[0316] The video shooting device provided in the embodiment of the present application determines the video shooting parameters by responding to the adjustment operation of the exposure adjustment control in the camera preview interface, and responds to the trigger operation of the video recording start control. According to the video shooting parameters, multiple frames of initial video frames with different exposure values are collected at each acquisition moment, and then the multiple frames of initial video frames collected at each acquisition moment are synthesized to generate target video frames corresponding to each acquisition moment. Therefore, by adjusting the shooting parameters when shooting the video according to the user's adjustment operation of the exposure adjustment control, and collecting multiple frames of video frames with different exposure values for synthesis, the target video frame finally generated can ensure that the highlight area is not overexposed and the dark details are improved, thereby not only improving the image shooting quality in the HDR scene, but also meeting the personalized shooting needs of the user, and having high flexibility.
[0317] In a possible implementation of the present application, the apparatus 1400 further includes:
[0318] A second determination module is used to determine a current dynamic range corresponding to the current scene according to the preview image collected during the preview process;
[0319] The first display module is used to display the exposure adjustment control in the camera preview interface when the current dynamic range is greater than or equal to the first threshold.
[0320] Furthermore, in another possible implementation of the present application, the video shooting parameters include a target exposure value corresponding to each initial video frame; accordingly, the first determination module 1401 includes:
[0321] A first determining unit, configured to determine, in response to an adjustment operation on an exposure adjustment control, an exposure level corresponding to the adjustment operation;
[0322] The second determining unit is used to determine the target exposure value corresponding to each initial video frame according to the exposure level.
[0323] Furthermore, in another possible implementation of the present application, the second determining unit is specifically configured to:
[0324] Determine the current dynamic range corresponding to the current scene according to the preview image collected during the preview process;
[0325] According to the current dynamic range, determine the reference exposure value corresponding to the current scene;
[0326] Determine the proportional relationship between the reference exposure value and the target exposure value corresponding to each initial video frame according to the exposure level;
[0327] The target exposure value corresponding to each initial video frame is determined according to the reference exposure value and the proportional relationship between the reference exposure value and the target exposure value corresponding to each initial video frame.
[0328] Furthermore, in another possible implementation of the present application, the second determining unit is further configured to:
[0329] When the exposure level is greater than the second threshold, the number of initial video frames is increased.
[0330] Furthermore, in another possible implementation of the present application, the video shooting parameters include a target exposure value corresponding to each initial video frame; accordingly, the first acquisition module 1402 includes:
[0331] A first acquisition unit, used to acquire a conversion gain parameter corresponding to the image sensor;
[0332] A third determination unit is used to determine the target exposure time, target conversion gain and target analog gain corresponding to each initial video frame according to the target exposure value and conversion gain parameter corresponding to each initial video frame;
[0333] The first acquisition unit is used to acquire multiple initial video frames at each acquisition moment according to a target exposure time, a target conversion gain, and a target analog gain corresponding to each initial video frame.
[0334] Furthermore, in another possible implementation of the present application, the first synthesis module 1403 includes:
[0335] A first synthesis unit is used to synthesize multiple initial video frames collected at each collection moment to generate synthetic video frames corresponding to each collection moment;
[0336] The tone mapping unit is used to perform tone mapping on the synthetic video frame corresponding to each acquisition moment to generate a target video frame corresponding to each acquisition moment.
[0337] Furthermore, in another possible implementation of the present application, the first synthesis unit is specifically used for:
[0338] For multiple initial video frames collected at each collection moment, obtain the brightness distribution corresponding to each initial video frame;
[0339] Determine synthesis parameters corresponding to each initial video frame according to the brightness distribution corresponding to each initial video frame;
[0340] According to the synthesis parameters, multiple initial video frames are synthesized to generate synthetic video frames corresponding to each acquisition moment, wherein the bit width of the synthetic video frame is greater than the bit width of each initial video frame.
[0341] Furthermore, in another possible implementation of the present application, the tone mapping unit is specifically used to:
[0342] According to the adjustment operation and the brightness distribution corresponding to each initial video frame collected at each collection moment, respectively determine the global tone mapping parameters and the local tone mapping parameters of the synthetic video frame corresponding to each collection moment;
[0343] According to the global tone mapping parameters of each synthetic video frame, each synthetic video frame is subjected to global tone mapping to generate a global tone mapping video frame corresponding to each acquisition moment;
[0344] According to the local tone mapping parameters corresponding to each synthetic video frame, local tone mapping is performed on the dark part of each global tone mapping video frame to generate a target video frame corresponding to each acquisition moment.
[0345] Furthermore, in another possible implementation of the present application, the tone mapping unit is further used to:
[0346] According to the adjustment operation, determining the exposure level corresponding to the adjustment operation;
[0347] According to the exposure level, determine the dark exposure value corresponding to the target video frame;
[0348] According to the dark exposure value and the brightness distribution corresponding to each initial video frame collected at each collection moment, the global tone mapping parameter and the local tone mapping parameter of each synthesized video frame are determined.
[0349] Furthermore, in another possible implementation of the present application, the apparatus 1400 further includes:
[0350] a third determination module, configured to determine a target dynamic range of a preview image displayed in a camera preview interface in response to an adjustment operation on the exposure adjustment control;
[0351] The first adjustment module is used to adjust the dynamic range of the preview image from an initial dynamic range to a target dynamic range with a preset step size, wherein the initial dynamic range refers to the dynamic range corresponding to the preview image before the adjustment operation occurs.
[0352] Furthermore, in another possible implementation of the present application, the apparatus 1400 further includes:
[0353] A first judgment module is used to judge whether the current scene is a human face scene according to the preview image collected during the preview process;
[0354] A fourth determination module, configured to determine the default gear position corresponding to the exposure adjustment control as the first gear position when the current scene is a face scene;
[0355] The fifth determination module is used to determine the default gear corresponding to the exposure adjustment control as the second gear when the current scene is not a face scene, wherein the exposure of the first gear is higher than the exposure of the second gear.
[0356] Furthermore, in another possible implementation of the present application, the first determination module includes:
[0357] A fourth determining unit, configured to determine that the current scene is a face scene when the preview image contains a face and the area of the face is greater than or equal to a third threshold;
[0358] The fifth determining unit is used to determine that the current scene is not a face scene when the preview image does not contain a face or the area of the face is smaller than a third threshold.
[0359] Furthermore, in another possible implementation of the present application, the apparatus 1400 further includes:
[0360] The format conversion module is used to convert the format of each target video frame to convert the target video frame into a displayable format.
[0361] Furthermore, in another possible implementation of the present application, the apparatus 1400 further includes:
[0362] The first generating module is used to end the recording and generate the target video in response to the triggering operation of the end recording control in the camera shooting interface, wherein the target video is generated according to the target video frame corresponding to each acquisition moment.
[0363] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0364] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0365] In order to implement the above embodiments, the present application also proposes an electronic device.
[0366] Fig.15 A schematic diagram of the structure of an electronic device according to an embodiment of the present application.
[0367] like Fig.15 As shown, the electronic device 1500 includes:
[0368] The memory 1510 and at least one processor 1520, a bus 1530 connecting different components (including the memory 1510 and the processor 1520), the memory 1510 stores a computer program, and when the processor 1520 executes the program, the video shooting method described in the embodiment of the present application is implemented.
[0369] Bus 1530 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.
[0370] The electronic device 1500 typically includes a variety of electronic device readable media. These media can be any available media that can be accessed by the electronic device 1500, including volatile and non-volatile media, removable and non-removable media.
[0371] The memory 1510 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 1540 and / or cache memory 1550. The electronic device 1500 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 1560 may be used to read and write non-removable, non-volatile magnetic media ( Fig.15 not shown, usually called a "hard drive"). Although Fig.15 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical medium) may be provided. In these cases, each drive may be connected to bus 1530 via one or more data medium interfaces. Memory 1510 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present application.
[0372] A program / utility 1580 having a set (at least one) of program modules 1570 may be stored, for example, in memory 1510, such program modules 1570 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 1570 generally perform the functions and / or methods of the embodiments described herein.
[0373] The electronic device 1500 may also communicate with one or more external devices 1590 (e.g., keyboard, pointing device, display 1591, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1500, and / or communicate with any device that enables the electronic device 1500 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 1592. In addition, the electronic device 1500 may also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN) and / or public network, such as the Internet) through a network adapter 1593. As shown, the network adapter 1593 communicates with other modules of the electronic device 1500 through a bus 1530. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0374] The processor 1520 executes various functional applications and data processing by running the programs stored in the memory 1510 .
[0375] It should be noted that the implementation process and technical principles of the electronic device of this embodiment refer to the aforementioned explanation of the video shooting method of the embodiment of the present application, and will not be repeated here.
[0376] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0377] An embodiment of the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0378] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the device / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0379] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0380] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0381] In the embodiments provided in the present application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0382] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0383] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A video shooting method, characterized in that: include: In response to an adjustment operation on an exposure adjustment control corresponding to a high dynamic range (HDR) in a camera preview interface, determining an exposure level corresponding to the adjustment operation, wherein the exposure adjustment control refers to a control displayed in the camera preview interface for a user to adjust an exposure value during video shooting; Determine the current dynamic range corresponding to the current scene according to the preview image collected during the preview process; Determining a reference exposure value corresponding to the current scene according to the current dynamic range; Determining a proportional relationship between the reference exposure value and a target exposure value corresponding to each initial video frame according to the exposure level; Determine the target exposure value corresponding to each frame of the initial video frame according to the reference exposure value and the proportional relationship between the reference exposure value and the target exposure value corresponding to each frame of the initial video frame; In response to a trigger operation on a video recording start control, a plurality of initial video frames are collected at each collection time according to a target exposure value corresponding to each of the initial video frames, wherein the exposure value of each of the initial video frames is different; The multiple initial video frames collected at each collection moment are synthesized to generate target video frames corresponding to each collection moment.
2. The method according to claim 1, characterized in that In response to the adjustment operation of the exposure adjustment control corresponding to the HDR in the camera preview interface, before determining the exposure level corresponding to the adjustment operation, the method further includes: Determine the current dynamic range corresponding to the current scene according to the preview image collected during the preview process; When the current dynamic range is greater than or equal to a first threshold, the exposure adjustment control is displayed in the camera preview interface.
3. The method according to claim 1, characterized in that Before determining the proportional relationship between the reference exposure value and the target exposure value corresponding to each initial video frame according to the exposure level, the method further includes: When the exposure level is greater than a second threshold, the number of the initial video frames is increased.
4. The method according to claim 1, characterized in that The step of collecting a plurality of initial video frames at each collection moment according to the target exposure value corresponding to each initial video frame includes: Obtain the conversion gain parameters corresponding to the image sensor; According to the target exposure value corresponding to each of the initial video frames and the conversion gain parameter, respectively determine the target exposure duration, target conversion gain and target analog gain corresponding to each of the initial video frames; According to the target exposure duration, the target conversion gain and the target analog gain corresponding to each frame of the initial video frame, a plurality of frames of the initial video frame are collected at each collection moment.
5. The method according to claim 1, characterized in that The synthesizing process of the multiple initial video frames collected at each collection moment to generate target video frames corresponding to each collection moment respectively includes: Performing synthesis processing on the multiple initial video frames collected at each collection moment to respectively generate synthetic video frames corresponding to each collection moment; Tone mapping is performed on the synthetic video frame corresponding to each of the acquisition moments to generate target video frames corresponding to each of the acquisition moments.
6. The method according to claim 5, characterized in that The synthesizing the multiple initial video frames collected at each collection moment to generate synthesized video frames corresponding to each collection moment respectively includes: For each of the multiple initial video frames acquired at the acquisition moment, obtaining a brightness distribution corresponding to each of the initial video frames; Determining synthesis parameters corresponding to the initial video frames of each frame according to the brightness distribution corresponding to the initial video frames of each frame; According to the synthesis parameters, a plurality of the initial video frames are synthesized to generate a synthesized video frame corresponding to each of the acquisition moments, wherein the bit width of the synthesized video frame is greater than the bit width of each of the initial video frames.
7. The method according to claim 5, characterized in that The tone mapping is performed on the synthetic video frame corresponding to each of the acquisition moments to generate the target video frame corresponding to each of the acquisition moments, including: According to the adjustment operation and the brightness distribution corresponding to each frame of the initial video frame collected at each collection moment, respectively determine the global tone mapping parameters and the local tone mapping parameters of the synthetic video frame corresponding to each collection moment; According to the global tone mapping parameters of the synthesized video frames of each frame, respectively, global tone mapping is performed on the synthesized video frames of each frame to generate a global tone mapped video frame corresponding to each acquisition moment; According to the local tone mapping parameters corresponding to each synthetic video frame, local tone mapping is performed on the dark part of each global tone mapping video frame to generate a target video frame corresponding to each acquisition moment.
8. The method according to claim 7, characterized in that The step of determining the global tone mapping parameters and the local tone mapping parameters of the synthesized video frame corresponding to each acquisition moment respectively according to the adjustment operation and the brightness distribution corresponding to each frame of the initial video frame acquired at each acquisition moment includes: According to the adjustment operation, determining an exposure level corresponding to the adjustment operation; Determining a dark portion exposure value corresponding to the target video frame according to the exposure level; According to the dark exposure value and the brightness distribution corresponding to each frame of the initial video frame collected at each collection moment, the global tone mapping parameter and the local tone mapping parameter of each frame of the synthesized video frame are determined.
9. The method according to claim 1, characterized in that In response to the adjustment operation of the exposure adjustment control corresponding to the HDR in the camera preview interface, after determining the exposure level corresponding to the adjustment operation, the method further includes: In response to an adjustment operation on the exposure adjustment control, determining a target dynamic range of a preview image displayed in the camera preview interface; The dynamic range of the preview image is adjusted from an initial dynamic range to the target dynamic range with a preset step size, wherein the initial dynamic range refers to the dynamic range corresponding to the preview image before the adjustment operation occurs.
10. The method according to claim 1, characterized in that In response to the adjustment operation of the exposure adjustment control corresponding to the HDR in the camera preview interface, before determining the exposure level corresponding to the adjustment operation, the method further includes: According to the preview image collected during the preview process, determining whether the current scene is a face scene; When the current scene is a face scene, determining the default gear position corresponding to the exposure adjustment control as the first gear position; When the current scene is not a face scene, the default gear corresponding to the exposure adjustment control is determined to be a second gear, wherein the exposure of the first gear is higher than the exposure of the second gear.
11. The method according to claim 10, characterized in that The step of judging whether the current scene is a face scene according to the preview image collected during the preview process includes: When a human face is included in the preview image and the area of the human face is greater than or equal to a third threshold, determining that the current scene is a human face scene; When the preview image does not include a human face or the area of the human face is smaller than a third threshold, it is determined that the current scene is not a human face scene.
12. The method according to any one of claims 1 to 11, characterized in that: After synthesizing the multiple initial video frames collected at each collection moment to generate target video frames corresponding to each collection moment, the method further includes: The format of each target video frame is converted to convert the target video frame into a displayable format.
13. The method according to any one of claims 1 to 11, characterized in that: After synthesizing the multiple initial video frames collected at each collection moment to generate target video frames corresponding to each collection moment, the method further includes: In response to a trigger operation on an end recording control in a camera shooting interface, the recording is ended and a target video is generated, wherein the target video is generated according to a target video frame corresponding to each of the acquisition moments.
14. A video shooting device, characterized in that: include: A first determining unit is configured to determine, in response to an adjustment operation on an exposure adjustment control corresponding to HDR in a camera preview interface, an exposure level corresponding to the adjustment operation, wherein the exposure adjustment control refers to a control displayed in the camera preview interface for a user to adjust an exposure value during video shooting; a second determining unit, configured to determine a current dynamic range corresponding to a current scene according to a preview image collected during a preview process, determine a reference exposure value corresponding to the current scene according to the current dynamic range, and determine a proportional relationship between the reference exposure value and a target exposure value corresponding to each initial video frame according to the exposure level, and further determine a target exposure value corresponding to each initial video frame according to the reference exposure value and a proportional relationship between the reference exposure value and the target exposure value corresponding to each initial video frame; A first acquisition module is used for, in response to a trigger operation on a video recording start control, acquiring a plurality of initial video frames at each acquisition moment according to a target exposure value corresponding to each of the initial video frames, wherein the exposure value of each of the initial video frames is different; The first synthesis module is used to synthesize the multiple frames of the initial video frames collected at each collection moment to generate target video frames corresponding to each collection moment respectively.
15. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 13 is implemented.
16. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 13 is implemented.
Citation Information
Patent Citations
Exposure control method, apparatus and electronic device
CN109068067A
Image processing method and device, storage medium and electronic equipment
CN110033418A
Image processing method and device, storage medium and electronic equipment
CN110392214A
Image processing method and device and electronic equipment
CN112399091A