Image processing method, apparatus, device, storage medium and program product
By acquiring images with different exposures using preset aperture parameters and then fusing them, the problem of poor image quality in high dynamic range images under special environments was solved, and high-quality image generation was achieved in environments with flickering artificial light sources and high brightness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING XIAOMI MOBILE SOFTWARE CO LTD
- Filing Date
- 2024-12-23
- Publication Date
- 2026-06-23
AI Technical Summary
In special shooting environments, existing technologies that obtain high dynamic range images by adjusting shorter exposure times have poor image quality, especially in environments with flickering artificial light sources and high brightness, where underexposed images cannot meet the requirements.
By acquiring light from each group using at least two preset aperture parameters, at least two frames of images with different exposures are obtained. A high dynamic range image is generated through image fusion. The aperture parameters and exposure time are adjusted to control the amount and duration of light, thus avoiding the need to adjust the exposure time.
It improves the imaging quality of high dynamic range images in special environments, addresses the problems of underexposed and overexposed images, and enhances the ability to capture image details.
Smart Images

Figure CN122269145A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of image technology, and in particular to an image processing method, apparatus, device, storage medium, and program product. Background Technology
[0002] High-Dynamic Range (HDR) images, compared to ordinary images, offer a greater dynamic range and more image detail, better reflecting the visual effects of the real environment.
[0003] In related technologies, low-dynamic range (LDR) images are acquired based on different exposure times, and the final HDR image is synthesized using the LDR images corresponding to each exposure time. However, under special shooting conditions, the HDR images obtained by the above method have poor image quality. Summary of the Invention
[0004] To overcome the problems in related technologies, this disclosure provides an image processing method, apparatus, device, storage medium, and program product, which improves the situation where underexposed images due to short exposure time cannot meet the requirements, thereby improving the imaging quality of high dynamic range images.
[0005] According to a first aspect of the present disclosure, an image processing method is provided, comprising:
[0006] In response to the detection of a shooting command, at least two captured images are obtained based on each group of light collected according to at least two preset aperture parameters; wherein the exposure of the captured images is different for each aperture parameter.
[0007] A high dynamic range image is generated based on the at least two acquired images.
[0008] In some embodiments, the method further includes:
[0009] Based on the image parameters of the preview image obtained before the shooting command, the exposure time corresponding to each aperture parameter is determined;
[0010] The process of obtaining at least two frames of captured images based on each group of light rays acquired according to at least two preset aperture parameters includes:
[0011] For each aperture parameter, based on a set of light rays collected within the exposure time corresponding to the aperture parameter, the acquired image corresponding to the aperture parameter is obtained, until at least two frames of the acquired image are obtained.
[0012] In some embodiments, the image parameters include: dynamic range values;
[0013] The step of determining the exposure time corresponding to each aperture parameter based on the image parameters of the preview image obtained before the shooting command includes:
[0014] In response to the dynamic range value being greater than a preset threshold, a first exposure time corresponding to each of the aperture parameters is determined; wherein, the aperture value indicated by the aperture parameter is negatively correlated with the first exposure time;
[0015] In response to the dynamic range value being less than or equal to the preset threshold, it is determined that each of the aperture parameters corresponds to a second exposure time.
[0016] In some embodiments, the preview image consists of at least two frames, and the image parameters include: image metrics parameters, which are positively correlated with the performance of the image;
[0017] The step of determining the exposure time corresponding to each aperture parameter based on the image parameters of the preview image obtained before the shooting command includes:
[0018] In response to the fact that the index parameters of at least two frames of the preview image are all greater than a preset index threshold, each aperture parameter is maintained to correspond to a third exposure duration; wherein the exposure of each frame of the preview image is different;
[0019] In response to the fact that the index parameter of any one of the preview images in at least two frames is less than or equal to the preset index threshold, each of the aperture parameters is adjusted to a different fourth exposure time corresponding to the third exposure time.
[0020] The fourth exposure duration is determined based on a preset mapping relationship and the aperture parameters, wherein the preset mapping relationship represents the correspondence between the aperture parameters and the fourth exposure duration.
[0021] In some embodiments, generating a high dynamic range image based on the at least two acquired images includes:
[0022] A reference image is selected from each frame of the acquired image, and the feature points of the acquired image are aligned with the feature points of the reference image.
[0023] The motion-blurred region is identified from the aligned acquired image, and the motion-blurred region is then cleared.
[0024] The high dynamic range image is generated based on the reference image and the acquired image after the cleaning process.
[0025] In some embodiments, the step of obtaining at least two captured images in response to detecting a shooting command, based on each group of light rays acquired according to at least two preset aperture parameters, includes:
[0026] In response to the detection of the shooting command, the ambient light source of the environment in which the electronic device is located is acquired;
[0027] In response to the ambient light source meeting the preset light source conditions, at least two frames of the acquired images are obtained based on each set of light rays collected according to each aperture parameter.
[0028] According to a second aspect of the present disclosure, an image processing apparatus is provided, comprising:
[0029] The acquisition module is configured to, in response to the detection of a shooting command, obtain at least two frames of acquired images based on each group of light collected according to at least two preset aperture parameters; wherein the exposure of the acquired images is different for each aperture parameter.
[0030] The generation module is configured to generate a high dynamic range image based on the at least two acquired images.
[0031] In some embodiments, the apparatus further includes:
[0032] The first determining module is configured to determine the exposure time corresponding to each aperture parameter based on the image parameters of the preview image obtained before the shooting command;
[0033] The acquisition module is specifically configured as follows:
[0034] For each aperture parameter, based on a set of light rays collected within the exposure time corresponding to the aperture parameter, the acquired image corresponding to the aperture parameter is obtained, until at least two frames of the acquired image are obtained.
[0035] In some embodiments, the image parameters include: dynamic range values;
[0036] The first determining module is specifically configured as follows:
[0037] In response to the dynamic range value being greater than a preset threshold, a first exposure time corresponding to each of the aperture parameters is determined; wherein, the aperture value indicated by the aperture parameter is negatively correlated with the first exposure time;
[0038] In response to the dynamic range value being less than or equal to the preset threshold, it is determined that each of the aperture parameters corresponds to a second exposure time.
[0039] In some embodiments, the preview image consists of at least two frames, and the image parameters include: image metrics parameters, which are positively correlated with the performance of the image;
[0040] The first determining module is further configured as follows:
[0041] In response to the fact that the index parameters of at least two frames of the preview image are all greater than a preset index threshold, each aperture parameter is maintained to correspond to a third exposure duration; wherein the exposure of each frame of the preview image is different;
[0042] In response to the fact that the index parameter of any one of the preview images in at least two frames is less than or equal to the preset index threshold, each of the aperture parameters is adjusted to a different fourth exposure time corresponding to the third exposure time.
[0043] The fourth exposure duration is determined based on a preset mapping relationship and the aperture parameters, wherein the preset mapping relationship represents the correspondence between the aperture parameters and the fourth exposure duration.
[0044] In some embodiments, the generation module is specifically configured as follows:
[0045] A reference image is selected from each frame of the acquired image, and the feature points of the acquired image are aligned with the feature points of the reference image.
[0046] The motion-blurred region is identified from the aligned acquired image, and the motion-blurred region is then cleared.
[0047] The high dynamic range image is generated based on the reference image and the acquired image after the cleaning process.
[0048] In some embodiments, the acquisition module is further configured to:
[0049] In response to the detection of the shooting command, the ambient light source of the environment in which the electronic device is located is acquired;
[0050] In response to the ambient light source meeting the preset light source conditions, at least two frames of the acquired images are obtained based on each set of light rays collected according to each aperture parameter.
[0051] According to a third aspect of the present disclosure, an electronic device is provided, comprising:
[0052] processor;
[0053] Memory used to store computer programs or instructions;
[0054] The processor executes computer programs or instructions to implement the steps in any of the image processing methods in the first aspect described above.
[0055] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, comprising:
[0056] When a computer program or instruction in a storage medium is executed by a processor, the steps in any of the image processing methods in the first aspect described above are implemented.
[0057] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program or instructions, which, when executed by a processor, implement the steps of any of the image processing methods in the first aspect described above.
[0058] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0059] In this embodiment of the disclosure, in response to the detection of a shooting command, at least two captured images are obtained based on each group of light collected according to at least two preset aperture parameters; wherein the exposure of the captured images corresponding to each aperture parameter is different; and a high dynamic range image is generated based on the at least two captured images. Thus, by adjusting the amount of light entering the camera, captured images with different exposures can be obtained, improving the situation where underexposed captured images due to short exposure times cannot meet the requirements, thereby improving the imaging quality of the high dynamic range image.
[0060] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0061] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0062] Figure 1 This is a flowchart illustrating an image processing method according to an exemplary embodiment.
[0063] Figure 2a This is a schematic diagram of an image according to an exemplary embodiment. Figure 1 .
[0064] Figure 2b This is a schematic diagram of an image according to an exemplary embodiment.
[0065] Figure 2c This is a schematic diagram of an image according to an exemplary embodiment. Figure 3 .
[0066] Figure 2d This is a schematic diagram of an image according to an exemplary embodiment. Figure 4 .
[0067] Figure 2e This is a schematic diagram of an image according to an exemplary embodiment. Figure 5 .
[0068] Figure 3 This is a schematic diagram of an image according to an exemplary embodiment. Figure 6 .
[0069] Figure 4 This is a schematic diagram of an image according to an exemplary embodiment.
[0070] Figure 5 This is a block diagram illustrating an image processing apparatus according to an exemplary embodiment.
[0071] Figure 6 This is a structural block diagram of an electronic device 600 according to an exemplary embodiment. Detailed Implementation
[0072] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0073] Figure 1 This is a flowchart illustrating an image processing method according to an exemplary embodiment, such as... Figure 1 As shown, this image processing method mainly includes the following steps:
[0074] In step 101, in response to the detection of a shooting command, at least two frames of captured images are obtained based on each group of light collected according to at least two preset aperture parameters; wherein the exposure of the captured images corresponding to each aperture parameter is different;
[0075] In step 102, a high dynamic range image is generated based on at least two acquired images.
[0076] It should be noted that the image processing method proposed in this disclosure can be applied to electronic devices. Here, electronic devices may include terminal devices, such as mobile terminals or fixed terminals. Mobile terminals may include mobile phones, tablets, laptops, wearable electronic devices, etc. Fixed terminals may include desktop computers, smart TVs, in-vehicle systems, etc. In other embodiments, the image processing method can also be applied to applications installed on electronic devices.
[0077] In other embodiments, the image processing method described in this disclosure can be configured in an image processing device, which can be located in an electronic device; this disclosure does not limit this. It should be noted that the execution entity of this disclosure can be a central processing unit (CPU) in the electronic device in hardware, and a related background service in the electronic device in software; this is not limited.
[0078] In some embodiments, the name of the LDR image varies depending on the exposure time. If the exposure time is insufficient, the resulting LDR image is an underexposed image, used to capture bright details of the image; if the exposure time is within the normal range, the resulting LDR image is a normally exposed image, used to capture medium brightness details of the image; if the exposure time is too long, the resulting LDR image is an overexposed image, used to capture dark details of the image.
[0079] In a related technology, when the ambient light source of an electronic device is an artificial light source, the light emitted by the artificial light source changes rapidly and repeatedly over time, causing the artificial light source to exhibit a flickering and unstable phenomenon, i.e., a flickering phenomenon. When the flicker period of the artificial light source does not match the camera's exposure time, for example, if the exposure time is too short or not an integer multiple of the light source's flicker period, underexposed images will exhibit a flickering phenomenon of alternating bright and dark stripes, resulting in poor image quality for high dynamic range images.
[0080] There are many reasons for the flickering phenomenon of artificial light sources. For example, the artificial power source is an AC power source, and the current and voltage of the AC power source will change with the sinusoidal wave over time, causing the AC power source to fluctuate. Another example is that the electronic components in the artificial light source (such as rectifiers, capacitors, etc.) have nonlinear characteristics, which cause the current and voltage to change when passing through, thereby causing the artificial light source to flicker.
[0081] In another related technology, when an electronic device is in a bright environment, overexposure can cause bright areas in the image to become too bright, resulting in loss of detail. Therefore, overexposure is reduced by shortening the exposure time of the Dual Conversion Gain (DCG) and the Very Short (VS) exposure time for generating the underexposed image. However, with a shortened DCG exposure time, the VS exposure time is even shorter. For example, if DCG:VS = 16:1, the DCG exposure time is 1 millisecond (ms), and the VS exposure time is 1 / 16 ms. In this case, the VS exposure time exceeds the sensor's minimum exposure time range, making it impossible to suppress the highlights when generating the underexposed image, leading to the failure of underexposed image generation.
[0082] Here, DCG technology is a technique used in camera sensors that allows the sensor to simultaneously utilize two amplification circuits with different magnifications within the same frame time to generate two image signals with significantly different intensities. DCR technology is used to improve the dynamic range of a camera, enabling it to capture more detail in both bright and low-light environments.
[0083] In other words, in certain scenarios, the underexposed images obtained by adjusting the exposure time in related technologies cannot meet the requirements, resulting in poor imaging quality of the generated high dynamic range images.
[0084] In this embodiment of the disclosure, at least two frames of images are obtained by collecting each group of light through at least two preset aperture parameters. Without adjusting the exposure time, underexposed, normally exposed, or overexposed images that meet the requirements can be obtained, thereby improving the imaging quality of high dynamic range images under special environments.
[0085] Here, aperture parameters include, but are not limited to, aperture value, aperture size, or the shape and number of aperture blades. Among them, the aperture value represents the numerical value of the aperture size, which is inversely proportional to the physical aperture diameter; the shape and number of aperture blades affect the circularity of the aperture opening and the shape of the light spot, and a larger number of aperture blades can produce a more circular aperture opening and a softer light spot effect.
[0086] In some embodiments, the electronic device incorporates a variable aperture, a device for controlling the amount of light entering the camera. This variable aperture adjusts the aperture size of the lens to control the amount of light entering the camera. The variable aperture consists of a series of blades that can open or close, thereby changing the size of the aperture through which light passes. When the aperture is fully open, light enters the camera with the largest possible aperture, maximizing the amount of light received by the camera's image sensor; when the aperture is fully closed, light cannot pass through the aperture to enter the camera, minimizing the amount of light received by the camera's image sensor.
[0087] It is understood that aperture parameters are related to the amount of light. Different aperture parameters can be used to obtain different amounts of light, and different amounts of light result in different exposures of the image. Therefore, in this embodiment of the present disclosure, by collecting each set of light with at least two aperture parameters, at least two frames of images with different exposures can be obtained.
[0088] In some embodiments, by setting an appropriate exposure time, details in dark areas and control of the signal-to-noise ratio are ensured; then, by continuously switching the variable aperture, an overexposed image is generated based on a set of light rays collected with a large aperture within a fixed exposure time, a normally exposed image is generated based on a set of light rays collected with a standard aperture within a fixed exposure time, and an underexposed image is generated based on a set of light rays collected with a small aperture within a fixed exposure time.
[0089] In other embodiments, by continuously switching the variable aperture in combination with different exposure times, images with different exposure levels can also be obtained. An overexposed image is generated based on a set of light rays collected within the exposure time corresponding to a large aperture; a normally exposed image is generated based on a set of light rays collected within the exposure time corresponding to a standard aperture; and an underexposed image is generated based on a set of light rays collected within the exposure time corresponding to a small aperture. Here, the aperture parameter controls the amount of light, so when acquiring an underexposed image, only a smaller amount of light needs to enter the camera, without needing to set a short exposure time. Therefore, even in special scenarios, an underexposed image that meets the requirements can be obtained.
[0090] It is understandable that after obtaining images with different exposures, fusing the images from each frame can produce a high dynamic range image.
[0091] There are many methods for synthesizing high dynamic range images, such as pixel-based HDR synthesis, pyramid decomposition-based HDR synthesis, or discrete wavelet transform-based HDR synthesis. This disclosure does not limit the specific methods used.
[0092] In some embodiments, the captured images of each frame are first decomposed into a pyramid to obtain image representations at multiple scales; and at each scale, a weight map is generated based on image gradient information and similarity weights; then, starting from the highest scale (i.e. the coarsest scale), the image is synthesized based on the weight map, and the process is carried out layer by layer until the final HDR image is generated.
[0093] In other embodiments, discrete wavelet transform is performed on each frame of acquired images to obtain different sub-band components; the low-frequency sub-bands are fused using weighted information graphs, and the high-frequency sub-bands are fused using local energy information; finally, an HDR image is generated through the inverse transform of discrete wavelet transform.
[0094] In some embodiments, in order to improve the imaging quality of high dynamic range images, multiple underexposed images, multiple normally exposed images, and multiple overexposed images can be acquired. Before generating a high dynamic range image, images that can capture more image details are selected, and then high-quality high dynamic range images are obtained by fusing the selected images with different exposures.
[0095] In this embodiment of the disclosure, in response to the detection of a shooting command, at least two captured images are obtained based on each group of light collected according to at least two preset aperture parameters; wherein the exposure of the captured images corresponding to each aperture parameter is different; and a high dynamic range image is generated based on the at least two captured images. Thus, by adjusting the amount of light entering the camera, captured images with different exposures can be obtained, improving the situation where underexposed captured images due to short exposure times cannot meet the requirements, thereby improving the imaging quality of the high dynamic range image.
[0096] In some embodiments, the method further includes:
[0097] Based on the image parameters of the preview image obtained before the shooting command, the exposure time corresponding to each aperture parameter is determined;
[0098] Based on each group of light rays acquired according to at least two preset aperture parameters, at least two frames of acquired images are obtained, including:
[0099] For each aperture parameter, based on a set of light rays collected within the exposure time corresponding to the aperture parameter, an image corresponding to the aperture parameter is obtained, until at least two images are obtained.
[0100] Understandably, in order to improve the imaging quality of high dynamic range images, in addition to controlling the amount of light entering the camera, the duration of light entering the camera can also be controlled, i.e., the exposure time corresponding to the aperture parameter, so that the generated underexposed and overexposed images can meet the requirements.
[0101] It's important to explain that during shooting, the camera can capture and display preview images in real time. By analyzing the image parameters of the preview image, both the image quality (e.g., assessing the current exposure parameters) and scene information about the shooting scene can be obtained. Therefore, based on the image parameters of the preview image acquired before the shooting command, the exposure time corresponding to the aperture parameters can be determined, thereby optimizing the exposure effect of the captured image and improving its image quality.
[0102] Here, scene information includes, but is not limited to, the overall brightness of the scene, the contrast between light and dark, and the position of the light source, etc., and the embodiments disclosed herein do not limit these aspects.
[0103] In some embodiments, the overall brightness of the shooting scene can be evaluated based on the image parameters of the preview image. When the overall brightness of the shooting scene is higher than a preset brightness threshold, the shooting scene is determined to be a bright scene. Highlight suppression is required in bright scenes. Therefore, the exposure time corresponding to the aperture parameter of the underexposed acquisition image is set to be longer, and the exposure time corresponding to the aperture parameter of the normally exposed acquisition image and the exposure time corresponding to the aperture parameter of the overexposed acquisition image can also be set to be longer.
[0104] In other embodiments, by collecting a set of light within a preset exposure time corresponding to each aperture parameter, two preview images with different exposures are obtained. When the image parameters of the two preview images both meet the preset index conditions, it is determined that the image quality of the two preview images is high, and the effect of the current exposure parameters is determined to be good. Thus, it is determined that the exposure time corresponding to each aperture parameter can be the preset exposure time when the shooting command is executed.
[0105] Here, the exposure time corresponding to each aperture parameter can be the same or different, and this embodiment does not limit this.
[0106] It should be noted that after obtaining the exposure time corresponding to each aperture parameter, the captured image corresponding to each aperture parameter can be obtained based on a set of light rays collected within the exposure time corresponding to each aperture parameter. Since both the width and duration of the light path entering the camera are controlled, the imaging quality of the captured image corresponding to each aperture parameter can be improved.
[0107] In some embodiments, when the exposure time corresponding to the first aperture parameter is A, the exposure time corresponding to the second aperture parameter is B, and the exposure time corresponding to the third aperture parameter is C, for the first aperture parameter, an image corresponding to the first aperture parameter is obtained based on a set of light rays collected within the exposure time A corresponding to the first aperture parameter; for the second aperture parameter, an image corresponding to the second aperture parameter is obtained based on a set of light rays collected within the exposure time B corresponding to the second aperture parameter; for the third aperture parameter, an image corresponding to the third aperture parameter is obtained based on a set of light rays collected within the exposure time C corresponding to the third aperture parameter; finally, the images corresponding to each aperture parameter are fused to obtain an HDR image.
[0108] In this embodiment, the exposure time corresponding to each preset aperture parameter is determined by the image parameters of the preview image. Upon detecting a shooting command, images corresponding to different aperture parameters are obtained by collecting a set of light rays within the exposure time corresponding to each aperture parameter. Thus, the exposure time corresponding to each aperture parameter can be accurately determined during the preview stage, and the amount of light for each aperture parameter can be precisely controlled during the shooting stage, improving the imaging effect of each acquired image and thereby enhancing the imaging quality of high dynamic range images.
[0109] In some embodiments, image parameters include: dynamic range values;
[0110] Based on the image parameters of the preview image acquired before the shooting command, the exposure time corresponding to each aperture parameter is determined, including:
[0111] In response to a dynamic range value exceeding a preset threshold, the first exposure duration corresponding to each aperture parameter is determined; wherein, the aperture value indicated by the aperture parameter is negatively correlated with the first exposure duration;
[0112] In response to a dynamic range value being less than or equal to a preset threshold, the second exposure time is determined for each aperture parameter.
[0113] It should be noted that the dynamic range of a scene refers to the range or ratio of the maximum and minimum brightness in the shooting scene. When the dynamic range of a scene is larger, it indicates that the changes in light in the scene are more drastic, and the requirements for the precision of the camera's exposure parameters are higher. On the other hand, when the dynamic range of a scene is smaller, it indicates that the changes in light in the scene are more stable, and the requirements for the precision of the camera's exposure parameters are lower.
[0114] Therefore, in this embodiment of the present disclosure, by setting a preset threshold, after obtaining the dynamic range value of the preview image, the preset threshold and the dynamic range value are compared to evaluate the dynamic range of the shooting scene, and then the exposure time corresponding to each aperture parameter is determined.
[0115] Here, the dynamic range value is the ratio between the brightest and darkest signals in the preview image. The preset threshold can be set arbitrarily according to requirements, and this embodiment does not limit it.
[0116] Understandably, when the dynamic range value is greater than the preset threshold, the larger the dynamic range of the shooting scene, the higher the precision required to control the camera's exposure parameters. Therefore, the first exposure time corresponding to each aperture parameter can be determined separately to ensure that details in the bright and dark areas are captured, improve dynamic range performance, and thus improve the imaging quality of HDR images.
[0117] Here, different aperture parameters correspond to different first exposure times. The aperture value indicated by the aperture parameter is negatively correlated with the first exposure time; the smaller the aperture value indicated by the aperture parameter, the longer the first exposure time; and the larger the aperture value indicated by the aperture parameter, the shorter the first exposure time.
[0118] In some embodiments, the aperture value is the ratio of the focal length to the lens aperture diameter, a parameter used to describe the aperture size, and can be represented by F or f, such as F / 1.4, f / 2.8, etc. Here, when the aperture value is small, such as F / 1.4, F / 2, etc., the aperture blades are in a spreading state, the aperture opening is large, allowing more light to enter the camera lens; while when the aperture value is large, such as F / 8, F / 16, etc., the aperture blades are in a converging state, the aperture opening is small, allowing less light to enter the camera lens.
[0119] When the dynamic range value is less than or equal to the preset threshold, the smaller the dynamic range of the shooting scene, the lower the control precision requirement for the camera's exposure parameters. Therefore, it is possible to determine that each aperture parameter corresponds to the second exposure time, without having to determine the exposure time corresponding to each aperture parameter separately, thus reducing power consumption.
[0120] Here, the first exposure time can be equal to, less than, or greater than the second exposure time; this disclosure does not limit this. In some embodiments, the second exposure time can be the exposure time corresponding to standard aperture parameters.
[0121] In this embodiment, by setting a preset threshold, when the dynamic range value is greater than the preset threshold, different first exposure times are determined for each aperture parameter, and when the dynamic range value is less than or equal to the preset threshold, the same second exposure time is determined for each aperture parameter. Thus, by using the preset threshold and the dynamic range value, the dynamic range of the current shooting scene is evaluated, and an exposure strategy matching the dynamic range of the shooting scene is selected, thereby improving the imaging effect of high dynamic range images.
[0122] In some embodiments, the preview image consists of at least two frames, and the image parameters include: image metrics parameters, which are positively correlated with the image performance;
[0123] Based on the image parameters of the preview image acquired before the shooting command, the exposure time corresponding to each aperture parameter is determined, including:
[0124] In response to the fact that the index parameters of at least two preview images are greater than the preset index threshold, the third exposure time is maintained for each aperture parameter; wherein the exposure of each preview image is different.
[0125] In response to the fact that the index parameter of any one of the at least two preview images is less than or equal to a preset index threshold, the third exposure time corresponding to each aperture parameter is adjusted to a different fourth exposure time.
[0126] The fourth exposure duration is determined based on a preset mapping relationship and aperture parameters. The preset mapping relationship represents the correspondence between aperture parameters and the fourth exposure duration.
[0127] It's important to note that the camera can be set with a default exposure strategy, where each aperture parameter corresponds to a third exposure duration. During the preview stage, for each aperture parameter, a preview image is generated based on a set of light rays collected within the corresponding third exposure duration, until at least two preview images with different aperture parameters are obtained. By analyzing the parameter values of each preview image, the degree of match between the current exposure strategy and the shooting scene can be evaluated, thereby determining whether to adjust the current exposure strategy.
[0128] Here, image metrics are parameters used to measure image quality and are positively correlated with image performance; when image metrics are improved, image performance also improves. Image metrics include, but are not limited to, the degree of image distortion, the presence of blurred areas, or image sharpness, etc., and this disclosure does not limit these aspects.
[0129] Understandably, in order to improve the accuracy of assessing the matching degree between the current exposure strategy and the shooting scene, a preset index threshold can be set, and the index parameters of each frame of captured images can be compared with the preset index threshold to assess the image quality of each frame of captured images, thereby further assessing the matching degree between the current exposure strategy and the shooting scene.
[0130] When the index parameters of each preview image are greater than the preset index threshold, it is determined that the image quality of each preview image is good, and the matching degree between the current exposure strategy and the shooting scene is high. In this way, it can be maintained that each aperture parameter corresponds to the third exposure time.
[0131] When the index parameter of any preview image in each frame is less than or equal to the preset index threshold, it is determined that the image quality of the preview image with the index parameter less than the preset index threshold is poor. This indicates that the current exposure strategy is not well matched with the shooting scene. In this way, the fourth exposure time corresponding to each aperture parameter can be determined separately, thereby ensuring that details in the bright and dark areas are captured, improving dynamic range performance, and thus improving the imaging quality of HDR images.
[0132] Understandably, in order to improve the accuracy and efficiency of determining the fourth exposure duration, a preset mapping relationship that characterizes the correspondence between aperture parameters and the fourth exposure duration can be established in advance. After determining the aperture parameters, the corresponding fourth exposure duration can be determined based on the preset mapping relationship and the aperture parameters.
[0133] For example, the preset mapping relationship indicates: the first aperture parameter is used to acquire an overexposed image, and the fourth exposure time corresponding to the first aperture parameter is 'a'; the second aperture parameter is used to acquire a normally exposed image, and the fourth exposure time corresponding to the second aperture parameter is 'b'; the third aperture parameter is used to acquire an underexposed image, and the fourth exposure time corresponding to the third aperture parameter is 'c'. Here, a>b>c, and the aperture value indicated by the first aperture parameter < the aperture value indicated by the second aperture parameter < the aperture value indicated by the third aperture parameter.
[0134] Here, the fourth exposure time varies depending on the aperture parameters. The fourth exposure time can be equal to the third exposure time, or it can be less than or greater than the third exposure time. This embodiment does not limit this.
[0135] In this embodiment, when the index parameters of each preview image frame are greater than a preset index threshold, each aperture parameter is maintained to correspond to a third exposure duration; when the index parameters of any preview image frame are less than or equal to the preset index threshold, the third exposure duration corresponding to each aperture parameter is adjusted to correspond to a different fourth exposure duration. Thus, by evaluating the image quality of the preview images, the matching degree between the current exposure strategy and the shooting scene can be assessed, thereby improving the imaging effect of high dynamic range images.
[0136] In some embodiments, generating a high dynamic range image based on at least two acquired images includes:
[0137] Select a reference image from each frame of acquired images, and align the feature points of the acquired images with the feature points of the reference images;
[0138] Identify motion-blurred regions from the aligned acquired images and remove them.
[0139] A high dynamic range image is generated based on the reference image and the acquired image after cleaning.
[0140] It should be explained that, considering the issue of motion blur in images during image acquisition due to camera shake or moving objects in the shooting environment, such motion blur not only affects the sharpness of the acquired image but also interferes with subsequent HDR image analysis, processing, and recognition tasks. Therefore, in this embodiment, after obtaining images at different exposures, the motion blur regions in the acquired images are removed to improve the imaging quality of the HDR images.
[0141] Understandably, in order to improve the accuracy of determining motion-blurred regions, reference images can be selected from each frame of acquired images. After feature alignment processing between other acquired images and parameter images, motion-blurred regions can be determined from other acquired images.
[0142] In some embodiments, during long exposures, if moving objects (such as people or leaves in the wind) are present in the shooting environment, these objects will move during the exposure, causing some areas to be underexposed or forming ghosting. In overexposed images, this ghosting may be more pronounced, resulting in motion-blurred areas. That is, overexposed images are more prone to motion-blurred areas; therefore, the reference image here can be either a normally exposed image or an underexposed image.
[0143] In some embodiments, feature points are extracted from the reference image and the acquired image respectively using a feature extraction algorithm; a descriptor is calculated for each detected feature point, and the difference between the feature point descriptors in the two images is compared using a preset similarity algorithm (such as Euclidean distance, cosine similarity, etc.) to obtain matching feature point pairs; then, based on the matching feature point pairs, the geometric transformation relationship between the reference image and the acquired image is estimated using methods such as least squares method and iterative nearest point algorithm to obtain a transformation matrix; finally, based on the transformation matrix, the acquired image is transformed so that the feature points in the acquired image are aligned with the feature points in the reference image in the same spatial reference frame.
[0144] There are many ways to remove motion-blurred regions, such as image interpolation methods, sparse representation methods, or machine learning methods. For example, interpolation algorithms include nearest-neighbor interpolation, bilinear interpolation, and bicubic interpolation, which estimate the missing pixel values in the motion-blurred region based on the pixel values surrounding the motion-blurred region and fill in the missing pixel values. Another example is constructing a sparse representation model that describes the sparsity features in the image. Based on this model, sparse features are extracted from an overexposed image, and then the extracted sparse features are sparsely encoded to reconstruct the motion-blurred region.
[0145] In this embodiment, after obtaining images with different exposure levels, the feature points of the acquired images are aligned with the feature points of the reference image to determine the motion blur region in the aligned acquired image. The motion blur region is then eliminated, and a high dynamic range image is generated. This improves both the striping phenomenon in underexposed acquired images due to short exposure times and the ghosting phenomenon in overexposed acquired images due to long exposure times, thereby enhancing the imaging quality of the high dynamic range image.
[0146] In some embodiments, in response to detecting a shooting command, at least two captured images are obtained based on each group of light rays acquired according to at least two preset aperture parameters, including:
[0147] In response to the detection of a shooting command, the ambient light source of the environment in which the electronic device is located is acquired;
[0148] In response to the ambient light source meeting the preset light source conditions, at least two frames of acquired images are obtained based on each set of light rays collected according to each aperture parameter.
[0149] Understandably, in certain scenarios, adjusting the exposure time to a shorter duration may not yield an underexposed image that meets the requirements, resulting in poor image quality of the generated high dynamic range image. Therefore, in this embodiment, preset light source conditions are set. First, the ambient light source of the electronic device's environment is acquired. When the ambient light source meets the preset light source conditions, the shooting scene is determined to be a special scene. Then, based on the amount of light determined by the aperture parameters, an underexposed image that meets the requirements is acquired.
[0150] Here, special scenes include at least bright scenes or artificial light source scenes. Therefore, the preset light source conditions can be used to determine whether the current shooting scene is a bright scene or an artificial light source scene.
[0151] In some embodiments, the preset light source conditions include at least color temperature conditions and / or flicker characteristics of the light source. By acquiring the ambient light source of the environment in which the electronic device is located, the color temperature of the ambient light source can be determined. Since the color and brightness of natural light sources (such as sunlight) change with time, weather, and geographical location, exhibiting richer color and brightness variations, while the color and brightness of artificial light sources are relatively fixed, exhibiting specific color temperatures (such as warm tones or cool tones), the color temperature of the ambient light source can be used to determine whether the ambient light source is artificial. Simultaneously, since the light source characteristics of natural light sources are relatively stable, while artificial light sources have flicker characteristics, determining the light source characteristics of the ambient light source can also determine whether the ambient light source is artificial. Here, as long as the ambient light source meets either the color temperature condition or the flicker characteristics of the light source, the shooting scene can be determined to be an artificial light source scene.
[0152] In other embodiments, the preset light source conditions include at least light source intensity conditions and / or light uniformity. Light sources in bright scenes have strong light intensity, ensuring bright and color-saturated images. Therefore, when the light intensity of the ambient light source reaches a preset intensity threshold, the shooting scene is determined to be a bright scene. Simultaneously, the light distribution in a bright scene is relatively uniform, without significant contrast or shadow areas, allowing the light source to evenly illuminate all corners of the scene, resulting in consistent brightness across the entire image. Therefore, when the light distribution of the ambient light source meets preset distribution conditions, the shooting scene is determined to be a bright scene. Here, as long as the ambient light source meets either the light source intensity condition or the light uniformity condition, the shooting scene can be determined to be a bright scene.
[0153] In this embodiment of the present disclosure, when a shooting command is detected, the ambient light source of the environment in which the electronic device is located is acquired, and when the ambient light source meets the preset light source conditions, each frame of captured image is obtained based on each group of light collected according to each aperture parameter, thereby improving the imaging quality of high dynamic range images in special shooting scenarios.
[0154] Taking a scene where the shooting location is an artificial light source as an example, Figure 2a This is a schematic diagram of an image according to an exemplary embodiment. Figure 1 ,like Figure 2a As shown, Figure 2a The image is an overexposed image 20. According to related technologies, adjusting the exposure time to a longer duration allows for the acquisition of a satisfactory overexposed image in artificial light environments. This disclosure also enables the acquisition of a satisfactory overexposed image in artificial light environments by increasing the amount of light entering the camera.
[0155] Figure 2b This is a schematic diagram of an image according to an exemplary embodiment, such as... Figure 2b As shown, Figure 2b The image 21 is an underexposed image obtained by adjusting a shorter exposure time in related technologies. Because artificial light sources have flickering characteristics, and related technologies can only set a shorter exposure time, the flickering period of the artificial light source does not match the exposure time of the camera, resulting in a flickering phenomenon of alternating bright and dark stripes in the underexposed image.
[0156] Figure 2c This is a schematic diagram of an image according to an exemplary embodiment. Figure 3 ,like Figure 2c As shown, Figure 2cFor the high dynamic range image 22 obtained based on related technologies, since there are bright and dark stripes in the underexposed image, the high dynamic range image generated based on the underexposed and overexposed images also has bright and dark stripes, resulting in poor high dynamic range imaging quality.
[0157] Figure 2d This is a schematic diagram of an image according to an exemplary embodiment. Figure 4 ,like Figure 2d As shown, Figure 2d The image 23 is an underexposed image obtained by adjusting the aperture parameters in related technologies. Since artificial light sources have flickering characteristics, and in this disclosure, by adjusting the aperture parameters, a smaller amount of light can be controlled to enter the camera during a longer exposure time, so that the flickering period of the artificial light source matches the exposure time of the camera, thus obtaining an underexposed image that meets the requirements.
[0158] Figure 2e This is a schematic diagram of an image according to an exemplary embodiment. Figure 5 ,like Figure 2e As shown, Figure 2e The high dynamic range image 24 obtained based on this disclosure does not have alternating bright and dark stripes in the underexposed image. Therefore, the high dynamic range image generated based on the underexposed image and the overexposed image also does not have alternating bright and dark stripes, resulting in good imaging quality of the high dynamic range.
[0159] Taking a bright scene as an example, Figure 3 This is a schematic diagram of an image according to an exemplary embodiment. Figure 6 ,like Figure 3 As shown, Figure 3 The example shown is an underexposed image 30 that failed to be generated in the related technology. In a bright scene, the exposure time of DCG is 1ms and the exposure time of VS is 1 / 16ms. At this time, the exposure time of VS exceeds the minimum exposure time range of the sensor, which makes it impossible to suppress the highlights when generating the underexposed image, resulting in the failure to generate the underexposed image.
[0160] Figure 4 This is a schematic diagram of an image according to an exemplary embodiment, such as... Figure 4 As shown, Figure 4 This is an underexposed image 40 obtained by adjusting the aperture parameters in this disclosure. By controlling the amount of light entering the camera during a longer exposure time, the highlights in the underexposed image are reduced, thereby improving the image quality of the underexposed image.
[0161] In this embodiment of the disclosure, by adjusting the amount of light entering the camera, images with different exposures can be obtained, which can improve the situation where underexposed images due to short exposure time cannot meet the requirements, thereby improving the imaging quality of high dynamic range images.
[0162] Figure 5 This is a block diagram illustrating an image processing apparatus according to an exemplary embodiment, such as... Figure 5 As shown, the image processing apparatus 500 includes:
[0163] The acquisition module 501 is configured to, in response to the detection of a shooting command, obtain at least two frames of captured images based on each group of light collected according to at least two preset aperture parameters; wherein the exposure of the captured images is different for each aperture parameter.
[0164] The generation module 502 is configured to generate a high dynamic range image based on the at least two acquired images.
[0165] In some embodiments, the device 500 further includes:
[0166] The first determining module is configured to determine the exposure time corresponding to each aperture parameter based on the image parameters of the preview image obtained before the shooting command;
[0167] The acquisition module 501 is specifically configured as follows:
[0168] For each aperture parameter, based on a set of light rays collected within the exposure time corresponding to the aperture parameter, the acquired image corresponding to the aperture parameter is obtained, until at least two frames of the acquired image are obtained.
[0169] In some embodiments, the image parameters include: dynamic range values;
[0170] The first determining module is specifically configured as follows:
[0171] In response to the dynamic range value being greater than a preset threshold, a first exposure time corresponding to each of the aperture parameters is determined; wherein, the aperture value indicated by the aperture parameter is negatively correlated with the first exposure time;
[0172] In response to the dynamic range value being less than or equal to the preset threshold, it is determined that each of the aperture parameters corresponds to a second exposure time.
[0173] In some embodiments, the preview image consists of at least two frames, and the image parameters include: image metrics parameters, which are positively correlated with the performance of the image;
[0174] The first determining module is further configured as follows:
[0175] In response to the fact that the index parameters of at least two frames of the preview image are all greater than a preset index threshold, each aperture parameter is maintained to correspond to a third exposure duration; wherein the exposure of each frame of the preview image is different;
[0176] In response to the fact that the index parameter of any one of the preview images in at least two frames is less than or equal to the preset index threshold, each of the aperture parameters is adjusted to a different fourth exposure time corresponding to the third exposure time.
[0177] The fourth exposure duration is determined based on a preset mapping relationship and the aperture parameters, wherein the preset mapping relationship represents the correspondence between the aperture parameters and the fourth exposure duration.
[0178] In some embodiments, the generation module 502 is specifically configured as follows:
[0179] A reference image is selected from each frame of the acquired image, and the feature points of the acquired image are aligned with the feature points of the reference image.
[0180] The motion-blurred region is identified from the aligned acquired image, and the motion-blurred region is then cleared.
[0181] The high dynamic range image is generated based on the reference image and the acquired image after the cleaning process.
[0182] In some embodiments, the acquisition module 501 is further configured to:
[0183] In response to the detection of the shooting command, the ambient light source of the environment in which the electronic device is located is acquired;
[0184] In response to the ambient light source meeting the preset light source conditions, at least two frames of the acquired images are obtained based on each set of light rays collected according to each aperture parameter.
[0185] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0186] Figure 6 This is a structural block diagram illustrating an electronic device 600 according to an exemplary embodiment. For example, the electronic device 600 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0187] Reference Figure 6The electronic device 600 may include one or more of the following components: processing component 602, memory 604, power supply component 606, multimedia component 608, audio component 610, input / output (I / O) interface 612, sensor component 614, and communication component 616.
[0188] Processing component 602 typically controls the overall operation of electronic device 600, such as operations associated with at least one of display, telephone call, data communication, camera operation, and recording operation. Processing component 602 may include one or more processors 620 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 602 may include one or more modules to facilitate interaction between processing component 602 and other components. For example, processing component 602 may include a multimedia module to facilitate interaction between multimedia component 608 and processing component 602.
[0189] Memory 604 is configured to store various types of data to support the operation of electronic device 600. Examples of such data include at least one of the following: instructions for any application or method operating on electronic device 600, contact data, phonebook data, messages, pictures, and videos. Memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0190] Power supply component 606 provides power to various components of electronic device 600. Power supply component 606 may include at least one of the following: a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 600.
[0191] Multimedia component 608 includes a screen that provides an output interface between electronic device 600 and user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a Touch Panel, the screen may be implemented as a touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 608 includes a front-facing camera and / or a rear-facing camera. When electronic device 600 is in an operating mode, such as a shooting mode or video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0192] Audio component 610 is configured to output and / or input audio signals. For example, audio component 610 includes a microphone (MIC) configured to receive external audio signals when electronic device 600 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 604 or transmitted via communication component 616. In some embodiments, audio component 610 also includes a speaker for outputting audio signals.
[0193] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, and buttons. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0194] Sensor assembly 614 includes one or more sensors for providing state assessments of various aspects of electronic device 600. For example, sensor assembly 614 may detect the on / off state of electronic device 600, the relative positioning of components such as the display and keypad of electronic device 600, changes in position of electronic device 600 or one of its components, the presence or absence of user contact with electronic device 600, orientation or acceleration / deceleration of electronic device 600, and temperature changes of electronic device 600. Sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 614 may also include an optical sensor, such as a complementary metal-oxide-semiconductor (CMOS) or charge-coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, sensor assembly 614 may also include, but is not limited to, at least one of the following: an accelerometer, a gyroscope, a magnetometer, a pressure sensor, and a temperature sensor.
[0195] Communication component 616 is configured to facilitate wired or wireless communication between electronic device 600 and other devices. Electronic device 600 can access wireless networks based on communication standards, such as Wi-Fi, 4G, 5G, or combinations thereof. In one exemplary embodiment, communication component 616 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 616 also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, UWB technology, Bluetooth (BT) technology, and other technologies.
[0196] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components.
[0197] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including executable instructions or a computer program, which can be executed by a processor 620 of an electronic device 600 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.
[0198] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a mobile terminal electronic device, enables the electronic device to perform any of the image processing methods described above in the embodiments of this disclosure. For example, the image processing method includes:
[0199] In response to the detection of a shooting command, at least two frames of captured images are obtained based on each group of light collected according to at least two preset aperture parameters; wherein the exposure of the captured images is different for each aperture parameter.
[0200] A high dynamic range image is generated based on at least two acquired images.
[0201] This disclosure provides a computer program product comprising a computer program or executable instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer program or executable instructions from the computer-readable storage medium and executes the computer program or executable instructions, causing the computer device to perform any of the image processing methods described above in this disclosure.
[0202] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0203] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. An image processing method, characterized in that, The method includes: In response to the detection of a shooting command, at least two captured images are obtained based on each group of light collected according to at least two preset aperture parameters; wherein the exposure of the captured images is different for each aperture parameter. A high dynamic range image is generated based on the at least two acquired images.
2. The method according to claim 1, characterized in that, The method further includes: Based on the image parameters of the preview image obtained before the shooting command, the exposure time corresponding to each aperture parameter is determined; The process of obtaining at least two frames of captured images based on each group of light rays acquired according to at least two preset aperture parameters includes: For each aperture parameter, based on a set of light rays collected within the exposure time corresponding to the aperture parameter, the acquired image corresponding to the aperture parameter is obtained, until at least two frames of the acquired image are obtained.
3. The method according to claim 2, characterized in that, The image parameters include: dynamic range value; The step of determining the exposure time corresponding to each aperture parameter based on the image parameters of the preview image obtained before the shooting command includes: In response to the dynamic range value being greater than a preset threshold, a first exposure time corresponding to each of the aperture parameters is determined; wherein, the aperture value indicated by the aperture parameter is negatively correlated with the first exposure time; In response to the dynamic range value being less than or equal to the preset threshold, it is determined that each of the aperture parameters corresponds to a second exposure time.
4. The method according to claim 2, characterized in that, The preview image consists of at least two frames, and the image parameters include: image metrics parameters, which are positively correlated with the performance of the image; The step of determining the exposure time corresponding to each aperture parameter based on the image parameters of the preview image obtained before the shooting command includes: In response to the fact that the index parameters of at least two frames of the preview image are all greater than a preset index threshold, each aperture parameter is maintained to correspond to a third exposure duration; wherein the exposure of each frame of the preview image is different; In response to the fact that the index parameter of any one of the preview images in at least two frames is less than or equal to the preset index threshold, each of the aperture parameters is adjusted to a different fourth exposure time corresponding to the third exposure time. The fourth exposure duration is determined based on a preset mapping relationship and the aperture parameters, wherein the preset mapping relationship represents the correspondence between the aperture parameters and the fourth exposure duration.
5. The method according to claim 1, characterized in that, The process of generating a high dynamic range image based on the at least two acquired images includes: A reference image is selected from each frame of the acquired image, and the feature points of the acquired image are aligned with the feature points of the reference image. The motion-blurred region is identified from the aligned acquired image, and the motion-blurred region is then cleared. The high dynamic range image is generated based on the reference image and the acquired image after the cleaning process.
6. The method according to any one of claims 1 to 5, characterized in that, In response to the detection of a shooting command, at least two frames of captured images are obtained based on each group of light rays collected according to at least two preset aperture parameters, including: In response to the detection of the shooting command, the ambient light source of the environment in which the electronic device is located is acquired; In response to the ambient light source meeting the preset light source conditions, at least two frames of the acquired images are obtained based on each set of light rays collected according to each aperture parameter.
7. An image processing apparatus, characterized in that, The device includes: The acquisition module is configured to, in response to the detection of a shooting command, obtain at least two frames of acquired images based on each group of light collected according to at least two preset aperture parameters; wherein the exposure of the acquired images is different for each aperture parameter. The generation module is configured to generate a high dynamic range image based on the at least two acquired images.
8. An electronic device, characterized in that, include: processor; Memory used to store computer programs or instructions; The processor executes a computer program or instructions to implement the steps of the method of any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium storing a computer program or instructions, characterized in that, When a computer program or instruction in a storage medium is executed by a processor, it implements the steps of the method of any one of claims 1 to 6.
10. A computer program product, comprising a computer program or instructions, characterized in that, When a computer program or instruction is executed by a processor, it implements the steps of the method of any one of claims 1 to 6.