Image processing method and device, electronic equipment and computer readable storage medium
By acquiring and analyzing the intra-frame motion information and sharpness values of long-exposure images and short-exposure images collected by the camera, the image fusion processing is guided, and the sharpness discontinuity caused by image blur in fast motion scenes is solved, and the image quality is improved.
Patent Information
- Application Number
- CN202510444409.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-07-29
AI Technical Summary
The long-exposure images taken in fast motion scenes are prone to serious blur, resulting in discontinuous image clarity after fusing with the short-exposure image, which reduces image quality.
By acquiring the long-exposure images and short-exposure images collected by the camera, the intra-frame motion information and sharpness values of the image are determined, and the fusion process is performed based on the image blur information to avoid inaccurate blur information caused by the low accuracy of a single factor, and guide image fusion.
Improve image fusion effect, avoid the problem of discontinuous clarity, and improve image quality.
Smart Images

Figure CN120390152A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular, to an image processing method, an apparatus, an electronic device, and a computer-readable storage medium. Background Art
[0002] With the rapid development of image processing technology and the improvement of the computing power of electronic devices, nowadays, electronic devices can fuse long-exposure images and short-exposure images through a High Dynamic Range (HDR) fusion algorithm to obtain an image that can show more highlights and shadows details, so as to improve the quality of the image.
[0003] In this regard, how to improve the fusion effect of long-exposure images and short-exposure images is an objective that is continuously optimized in this field. Summary of the Invention
[0004] Embodiments of this application disclose an image processing method, an apparatus, an electronic device, and a computer-readable storage medium, which can improve the image quality of the target image obtained by fusion.
[0005] A first aspect of an embodiment of this application discloses an image processing method, including:
[0006] Obtain a first exposure image and a second exposure image collected by a camera, where the exposure duration corresponding to the first exposure image is greater than the exposure duration corresponding to the second exposure image;
[0007] Determine the in-frame motion information of the first exposure image, and / or the sharpness values corresponding to the first exposure image and the second exposure image respectively according to the first exposure image and the second exposure image;
[0008] Determine the image blur information of the first exposure image according to the in-frame motion information of the first exposure image, and / or the sharpness values corresponding to the first exposure image and the second exposure image respectively;
[0009] Fuse the first exposure image and the second exposure image according to the image blur information to obtain a target image.
[0010] A second aspect of an embodiment of this application discloses an image processing apparatus, including:
[0011] A first obtaining unit, configured to obtain a first exposure image and a second exposure image collected by a camera, where the exposure duration corresponding to the first exposure image is greater than the exposure duration corresponding to the second exposure image;
[0012] A first determination unit, configured to determine the intra-frame motion information of the first exposure image and / or the sharpness values corresponding to the first exposure image and the second exposure image respectively according to the first exposure image and the second exposure image;
[0013] A second determination unit, configured to determine the image blur information of the first exposure image according to the intra-frame motion information of the first exposure image and / or the sharpness values corresponding to the first exposure image and the second exposure image respectively;
[0014] A fusion unit, configured to perform a fusion process on the first exposure image and the second exposure image according to the image blur information to obtain a target image.
[0015] A third aspect of the embodiments of the present application discloses an electronic device, including:
[0016] A memory storing executable program code;
[0017] A processor coupled to the memory;
[0018] The processor calls the executable program code stored in the memory and executes the image processing method disclosed in the first aspect of the embodiments of the present application.
[0019] A fourth aspect of the embodiments of the present application discloses a computer-readable storage medium, which stores a computer program, wherein the computer program enables a computer to execute the image processing method disclosed in the first aspect of the embodiments of the present application.
[0020] A fifth aspect of the embodiments of the present application discloses a computer program product, when the computer program product runs on a computer, enabling the computer to execute some or all of the steps of any one of the methods disclosed in the first aspect of the embodiments of the present application.
[0021] A sixth aspect of the embodiments of the present application discloses an application publishing platform, the application publishing platform is used to publish a computer program product, wherein when the computer program product runs on a computer, enabling the computer to execute some or all of the steps of any one of the methods disclosed in the first aspect of the embodiments of the present application.
[0022] Compared with the related art, the embodiments of the present application have the following beneficial effects:
[0023] In the embodiments of the present application, a first exposure image and a second exposure image collected by a camera can be obtained, where the exposure duration corresponding to the first exposure image is greater than the exposure duration corresponding to the second exposure image; further, the in-frame motion information of the first exposure image, and / or the sharpness values respectively corresponding to the first exposure image and the second exposure image can be determined according to the first exposure image and the second exposure image; and the image blur information of the first exposure image can be determined according to the in-frame motion information of the first exposure image, and / or the sharpness values respectively corresponding to the first exposure image and the second exposure image. It can be seen that the embodiments of the present application can determine the image blur information of the first exposure image through multiple factors, avoiding the situation where the inaccurate determination of the image blur information is caused by the low accuracy of a single factor. Furthermore, subsequently, the accurate image blur information can be used to guide the fusion processing of the first exposure image and the second exposure image, thereby improving the image quality of the fused target image. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0025] Figure 1 is a schematic diagram of a fused image disclosed in an embodiment of the present application;
[0026] Figure 2 is a schematic flowchart of an image processing method disclosed in an embodiment of the present application;
[0027] Figure 3 is a schematic flowchart of another image processing method disclosed in an embodiment of the present application;
[0028] Figure 4 is a schematic flowchart of yet another image processing method disclosed in an embodiment of the present application;
[0029] Figure 5 is a schematic diagram of extracting an image edge disclosed in an embodiment of the present application;
[0030] Figure 6 is a schematic flowchart of still another image processing method disclosed in an embodiment of the present application;
[0031] Figure 7 is a schematic structural diagram of an image processing apparatus disclosed in an embodiment of the present application;
[0032] Figure 8 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0033] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without making creative efforts shall fall within the protection scope of the present application.
[0034] It should be noted that the terms "first", "second", "third", "fourth", etc. in the specification and claims of the present application are used to distinguish different objects, rather than to describe a specific order. The terms "including" and "having" in the embodiments of the present application and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[0035] The embodiments of the present application disclose an image processing method, apparatus, electronic device, and computer-readable storage medium, which can improve the image quality of the fused target image.
[0036] The technical solutions of the present application will be described in detail below with reference to specific embodiments.
[0037] In order to more clearly introduce the image processing method disclosed in the embodiments of the present application, first, the image processing method in the related art will be introduced.
[0038] "Dynamic range" is an important evaluation index of imaging quality. It describes the ability of an image to simultaneously display highlights and shadows. If the dynamic range is insufficient, problems such as overexposure in bright areas or dead black in dark areas will occur. To this end, in order to expand the dynamic range during imaging, long-exposure images and short-exposure images are usually acquired successively in the related art; among them, the exposure duration of the long-exposure image is longer than that of the short-exposure image. The longer exposure duration makes the image of the long-exposure image brighter, so that more dark details can be recorded, while the short-exposure image can retain more bright details; then, the long-exposure image and the short-exposure image are fused through a high dynamic range (HDR) fusion algorithm to obtain an image with a larger dynamic range. In addition, because the long-exposure image has a longer exposure duration, the movement of the object or the camera during the exposure duration will cause image blurring in the long-exposure image. Since the short-exposure image has a shorter exposure duration, serious blurring usually does not occur. Therefore, through the HDR fusion algorithm, the short-exposure image can be fused with the long-exposure image, and the image blurring in the long-exposure image can also be reduced.
[0039] However, it is found in practice that for a long-exposure image captured in a fast-moving scene, the entire image will be severely blurred due to motion. Since the short-exposure image can only compensate for the blur in some areas, if it is fused with the short-exposure image, there will be a problem of discontinuous image sharpness.
[0040] Exemplarily, please refer to Figure 1 , Figure 1 which is a schematic diagram of a fused image disclosed in an embodiment of the present application. Among them, in the fused image 110 after fusing the long-exposure image and the short-exposure image, there is a region 120 with discontinuous sharpness in the fused image 110, which seriously affects the quality of the image.
[0041] However, related technologies usually do not analyze the blur situation of the long-exposure image, but all perform normal fusion processing, thus easily resulting in a situation where the sharpness of the fused image is discontinuous, reducing the quality of the image.
[0042] An image processing method disclosed in an embodiment of the present application can obtain a first exposure image (i.e., a long-exposure image) and a second exposure image (i.e., a short-exposure image) collected by a camera, where the exposure duration corresponding to the first exposure image is greater than the exposure duration corresponding to the second exposure image; furthermore, the in-frame motion information of the first exposure image, and / or the sharpness values respectively corresponding to the first exposure image and the second exposure image can be determined according to the first exposure image and the second exposure image; and the image blur information of the first exposure image can be determined according to the in-frame motion information of the first exposure image, and / or the sharpness values respectively corresponding to the first exposure image and the second exposure image; furthermore, the fusion process of the first exposure image and the second exposure image can be guided according to the image blur information of the first exposure image; for example: if only some areas of the first exposure image are blurred, normal fusion can be performed; and if the entire image of the first exposure image is blurred, the first exposure image can be discarded and only the second exposure image is output, avoiding the situation of "discontinuous sharpness after fusion" mentioned above, thereby improving the fusion effect of the image.
[0043] In addition, the embodiment of the present application determines the image blur information of the first exposure image through multiple factors, which can improve the ability to resist noise and environmental changes, thereby improving the accuracy of the determined image blur information of the first exposure image. And accurate image blur information helps to better guide subsequent image fusion to improve the image fusion effect.
[0044] Based on this, the image processing method and device, electronic device, and computer-readable storage medium disclosed in the embodiments of the present application are described below.
[0045] Please refer to Figure 2 ,Figure 2 This is a schematic flowchart of an image processing method disclosed in an embodiment of the present application. Optionally, this method can be applied to various electronic devices with image processing capabilities, or other execution entities, which are not limited herein. Optionally, this method may include the following steps:
[0046] 202. Obtain a first exposure image and a second exposure image collected by a camera, where the exposure duration corresponding to the first exposure image is greater than the exposure duration corresponding to the second exposure image.
[0047] In an embodiment of the present application, the camera can continuously collect the first exposure image and the second exposure image.
[0048] Optionally, the camera can collect the first exposure image and the second exposure image respectively in a manner where the collection intervals for the same scene are less than a duration threshold and the exposure durations are different, where the exposure duration corresponding to the first exposure image is greater than the exposure duration corresponding to the second exposure image. That is, the first exposure image can be the long exposure image introduced above, and the second exposure image can be the short exposure image introduced above.
[0049] Among them, the duration threshold and similarity can be set by developers based on a large amount of development experience. Typical values of the duration threshold can include: 0.1 second, 0.2 second, etc.
[0050] Optionally, the exposure duration corresponding to the first exposure image can be: 1 second or slower, for low-light environments or creating dynamic blur effects; the exposure duration of the second exposure image can be: 1 / 250 second, or faster, with the core goal of freezing motion or controlling strong light, which is not limited herein.
[0051] 204. Determine the in-frame motion information of the first exposure image based on the first exposure image and the second exposure image, and / or the sharpness values respectively corresponding to the first exposure image and the second exposure image.
[0052] In an embodiment of the present application, the electronic device can match the first exposure image and the second exposure image to obtain the inter-frame motion information between the first exposure image and the second exposure image. The inter-frame motion information can characterize the distance that the global area or partial area of the first exposure image needs to move to the corresponding position in the second exposure image. Inter-frame motion is usually caused by camera motion or the movement of objects in the scene.
[0053] Furthermore, the electronic device can determine the in-frame motion information of the first exposure image based on the inter-frame motion information. The in-frame motion information of the first exposure image can characterize the trajectory length of the object in the first exposure image due to motion blur, reflecting the cumulative displacement of the object during the exposure duration.
[0054] The sharpness value, also known as "clarity," is an indicator of the clarity of the image plane and the sharpness of the image edges. Optionally, the electronic device can determine the image edge strength of the first and second exposure images, and then determine the sharpness values corresponding to the first and second exposure images based on the image edge strength of the first and second exposure images.
[0055] The image edge strength can represent the gradient amplitude of the edge region in the image, that is, the degree of spatial variation of pixel values. For example, the gradient amplitude of a sharp edge is high (strong), while the gradient amplitude of a blurred edge is low (weak).
[0056] It should be noted that high edge strength generally means high sharpness, but high sharpness also requires conditions such as rich details and low noise. Considering the relative ease of obtaining image edge strength, this embodiment of the present application considers image edge strength to be roughly equal to the sharpness value, thereby reducing the difficulty of determining the sharpness values corresponding to the first and second exposure images, and thereby reducing the difficulty of implementing the method.
[0057] 206 : Determine image blur information of the first exposure image according to intra-frame motion information of the first exposure image and / or sharpness values corresponding to the first exposure image and the second exposure image respectively.
[0058] As previously mentioned, image blur in the first exposure image is typically caused by movement of the camera or subject during exposure. The more intense the movement, the more severe the resulting image blur may be. The intra-frame motion information of the first exposure image can characterize the length of the object's trajectory caused by motion blur in the first exposure image, reflecting the object's cumulative displacement during the exposure time. This information, to some extent, reflects the intensity of the camera or subject's movement during exposure.
[0059] Optionally, the electronic device may determine the image blur information of the first exposure image based on the intra-frame motion information of the first exposure image. Optionally, the image blur information of the first exposure image may include the image blur degree of the first exposure image.
[0060] The image sharpness value can reflect the clarity of the image. Higher image sharpness indicates lower image blur, while lower image sharpness indicates higher image blur. In other words, image blur information is negatively correlated with the image sharpness value. Alternatively, the electronic device can determine the image blur information of the first exposure image based on the sharpness values corresponding to the first exposure image and the second exposure image, respectively.
[0061] 208. Perform fusion processing on the first exposure image and the second exposure image according to the image blur information of the first exposure image to obtain a target image.
[0062] In the embodiments of the present application, the electronic device may determine the image blurring degree of the first exposure image according to the image blurring information of the first exposure image, and then determine the corresponding target processing method according to the blurring degree interval in which the image blurring degree of the first exposure image is located.
[0063] Optionally, the target processing method may include one or more of the following:
[0064] (1) Perform fusion processing on the first exposure image and the second exposure image to obtain a target image.
[0065] Optionally, the electronic device may perform fusion processing on the first exposure image and the second exposure image through the HDR fusion algorithm introduced above to obtain a target image.
[0066] (2) Perform fusion on the first exposure image and the second exposure image, and perform smoothing processing on the fusion edge of the first exposure image and the second exposure image to obtain a target image.
[0067] Optionally, the electronic device may perform fusion on the first exposure image and the second exposure image through the HDR fusion algorithm introduced above; and perform smoothing processing on the fusion edge of the first exposure image and the second exposure image.
[0068] Among them, the smoothing processing refers to making the connection between two frames of images transition naturally in terms of brightness, color, and details through technical means to avoid obvious seams, color block breaks, or edge artifacts. Optionally, the methods for realizing the smoothing processing may include: weight map optimization, multi-scale fusion, or gradient domain fusion, etc., which are not limited herein.
[0069] (3) Determine the second exposure image as the target image.
[0070] Optionally, the electronic device may discard the first exposure image and determine the second exposure image as the target image.
[0071] In an optional embodiment, when the electronic device determines that the image blurring information of the first exposure image is less than the first threshold, it may perform fusion processing on the first exposure image and the second exposure image to obtain a target image.
[0072] It should be noted that if the image blurring information of the first exposure image is less than the first threshold, it means that the blurring degree of the first exposure image is relatively low. At this time, when fusing with the second exposure image, it is highly unlikely to have the problem of "the clarity of the fused image is discontinuous" introduced above. Therefore, the electronic device may perform fusion processing on the first exposure image and the second exposure image to obtain a target image with a higher dynamic range, improving the image quality of the target image.
[0073] In another embodiment, when the electronic device determines that the image blur information of the first exposure image is greater than the first threshold and less than the second threshold, it may fuse the first exposure image and the second exposure image, and smooth the fusion edge of the first exposure image and the second exposure image to obtain a target image; wherein, the second threshold is greater than the first threshold.
[0074] If the image blur information of the first exposure image is greater than the first threshold and less than the second threshold, it indicates that the first exposure image only has relatively weak blur. When implementing the above method, when the electronic device fuses the first exposure image and the second exposure image, it can smooth the fusion edge of the first exposure image and the second exposure image, so that the fusion edge transitions more naturally, avoiding the problem of "the clarity of the fused image is discontinuous", and improving the image quality of the subsequent obtained target image.
[0075] Among them, the above first threshold and second threshold can be set by developers based on a large amount of development experience, and are not limited herein.
[0076] In yet another alternative embodiment, when the electronic device determines that the image blur information of the first exposure image is greater than the second threshold, it may determine the second exposure image as the target image.
[0077] When implementing the above method, when the image blur information of the first exposure image is greater than the second threshold, the electronic device can determine that the first exposure image has relatively serious blur. If forced fusion may lead to the problem of "the clarity of the fused image is discontinuous". In this regard, the electronic device can discard the first exposure image and determine the second exposure image as the target image, thereby improving the image quality of the target image.
[0078] By implementing the methods disclosed in the above embodiments, the first exposure image and the second exposure image collected by the camera can be obtained, where the exposure duration corresponding to the first exposure image is greater than the exposure duration corresponding to the second exposure image; furthermore, the in-frame motion information of the first exposure image, and / or the sharpness values respectively corresponding to the first exposure image and the second exposure image can be determined according to the first exposure image and the second exposure image; and the image blur information of the first exposure image can be determined according to the in-frame motion information of the first exposure image, and / or the sharpness values respectively corresponding to the first exposure image and the second exposure image. It can be seen that the embodiments of the present application can determine the image blur information of the first exposure image through multiple factors, avoiding the situation that the inaccurate determination of the image blur information is caused by the low accuracy of a single factor. Furthermore, the subsequent fusion process of the first exposure image and the second exposure image can be guided according to the accurate image blur information, thereby improving the fusion effect of the image.
[0079] Please refer toFigure 3 , Figure 3 is a schematic flowchart of another image processing method disclosed in an embodiment of the present application. Optionally, this method can be applied to various electronic devices with image processing capabilities, or other execution entities, which are not limited herein. Optionally, this method may include the following steps:
[0080] 302. Obtain a first exposure image and a second exposure image collected by a camera, where the exposure duration corresponding to the first exposure image is greater than the exposure duration corresponding to the second exposure image.
[0081] 304. Determine the intra-frame motion information of the first exposure image according to the first exposure image and the second exposure image, where the intra-frame motion information includes the intra-frame motion distance corresponding to each pixel point in the first exposure image.
[0082] In an optional embodiment, the electronic device may perform image matching on the first exposure image and the second exposure image to obtain image transformation mapping information. Among them, the image transformation mapping information represents the distance that each pixel point in the first exposure image needs to move to the corresponding position in the second exposure image. Exemplarily, assume that the coordinate of a certain pixel point in the first exposure image is (100, 200), and the displacement recorded in the image transformation mapping information is (Δx = 5, Δy = -3), then the position of this pixel in the second exposure image is (105, 197).
[0083] Optionally, the electronic device may perform image matching on the first exposure image and the second exposure image through a matching algorithm to obtain image transformation mapping information. Optionally, the matching algorithm may include: optical flow method or image alignment method, which are not limited herein.
[0084] Among them, the image transformation mapping information obtained by the optical flow method reflects the local motion information of the image, while the image transformation mapping information obtained by the image alignment method reflects the global motion information between images. In the embodiment of the present application, what is more needed to be determined is the global motion situation between images. For this reason, in the embodiment of the present application, the image transformation mapping information obtained by the electronic device through the image alignment method has better representativeness.
[0085] Furthermore, the electronic device may determine the inter-frame motion information between the first exposure image and the second exposure image according to the image transformation mapping information.
[0086] Optionally, the electronic device may determine the inter-frame motion information between the first exposure image and the second exposure image according to the image transformation mapping information through a target statistical algorithm. Optionally, the target statistical algorithm may include: the L2 norm method. In image processing, the L2 norm (L2 Norm) is a common method for calculating the length of a vector, also known as the Euclidean distance. When applied to image transformation mapping information (such as an optical flow field or a displacement field), the L2 norm can be used to quantify the motion distance of pixel points or the entire image.
[0087] Furthermore, the electronic device may determine the intra-frame motion information of the first exposure image according to the exposure durations corresponding to the first exposure image and the second exposure image respectively, and the inter-frame motion information.
[0088] Optionally, the electronic device may determine a proportionality coefficient according to the exposure durations corresponding to the first exposure image and the second exposure image respectively; and then calculate the product of the inter-frame motion information and the proportionality coefficient to obtain the intra-frame motion information of the first exposure image.
[0089] Optionally, the electronic device may calculate 1 / 2 of the exposure duration of the first exposure image to obtain a first calculation result; calculate 1 / 2 of the exposure duration of the second exposure image to obtain a second calculation result; calculate the sum of the first calculation result and the second calculation result to obtain a third calculation result; and then calculate the exposure duration of the first exposure duration divided by the third calculation result to obtain the proportionality coefficient.
[0090] Exemplarily, assuming that the inter-frame motion information calculates the displacement information of the exposure center point of the first exposure image, the electronic device may convert the inter-frame motion information into the intra-frame motion information of the first exposure image through the following formula 1, that is:
[0091]
[0092] where ev0_dis represents the intra-frame motion information of the first exposure image, ev0_evm_dis is the inter-frame motion information, ev0_shutter is the exposure duration of the first exposure image, and evm_shutter is the exposure duration of the second exposure image.
[0093] By implementing the above method, the electronic device may first calculate the inter-frame motion information between the first exposure image and the second exposure image, and then use the easily obtained inter-frame motion information, combined with the exposure durations of the first exposure image and the second exposure image, to determine the intra-frame motion information of the first exposure image. This method is simple and efficient, and reduces the implementation difficulty of this method.
[0094] 306. Determine a first number of target pixels in the first exposure image based on the intra-frame motion distance corresponding to each pixel in the first exposure image, where the target pixel is a pixel whose intra-frame motion distance is greater than a distance threshold; determine image blur information of the first exposure image based on the first number of target pixels.
[0095] In the embodiment of the present application, the target pixel is a pixel whose intra-frame motion distance is greater than a distance threshold. In other words, the target pixel can be considered to be a pixel that has undergone significant motion during the exposure period. The distance threshold can be set by the developer based on extensive development experience and is not limited here.
[0096] To this end, the electronic device can count a first number of target pixels in the first exposure image. A greater first number of target pixels indicates more intense motion during the first exposure image, and thus a greater degree of image blur in the first exposure image. Conversely, a smaller first number of target pixels indicates less intense motion during the first exposure image, and thus a lower degree of image blur in the first exposure image. In other words, the image blur information of the first exposure image can be positively correlated with the first number of target pixels. Therefore, the electronic device can determine the image blur information of the first exposure image based on the first number of target pixels.
[0097] By implementing the above method, the electronic device can determine the intensity of the movement of the first exposure image during the exposure period based on the first number of target pixels with more intense movement in the first exposure image, and then determine the image blur information of the first exposure image. This method only requires simple statistics and is easy to implement, thereby reducing the difficulty of implementing the method.
[0098] 308. Perform fusion processing on the first exposure image and the second exposure image according to the image blur information of the first exposure image to obtain a target image.
[0099] By implementing the methods disclosed in the above embodiments, a first exposure image and a second exposure image captured by a camera can be obtained, wherein the exposure time corresponding to the first exposure image is longer than the exposure time corresponding to the second exposure image; and then, based on the first exposure image and the second exposure image, the intra-frame motion information of the first exposure image and / or the sharpness values corresponding to the first exposure image and the second exposure image can be determined; and based on the intra-frame motion information of the first exposure image and / or the sharpness values corresponding to the first exposure image and the second exposure image, the image blur information of the first exposure image can be determined. It can be seen that the embodiments of the present application can determine the image blur information of the first exposure image through multiple factors, avoiding the situation where the low precision of a single factor leads to inaccurate determined image blur information, and then, based on the accurate image blur information, the first exposure image and the second exposure image can be guided for fusion processing, thereby improving the image fusion effect;
[0100] Furthermore, the electronic device can first calculate the inter-frame motion information of the first exposure image and the second exposure image, and then use the easily obtained inter-frame motion information in combination with the exposure time of the first exposure image and the second exposure image to determine the intra-frame motion information of the first exposure image. This method is simple and efficient, which reduces the difficulty of implementing the method; and, based on the first number of target pixels with more intense motion in the first exposure image, the intensity of motion of the first exposure image during the exposure period can be determined, and then the image blur information of the first exposure image can be determined. This method only requires simple statistics and is simple to implement, thereby reducing the difficulty of implementing the method.
[0101] See also Figure 4 , Figure 4 This is a flowchart of another image processing method disclosed in an embodiment of the present application. Optionally, the method can be applied to various electronic devices with image processing capabilities, or other execution entities, without limitation herein. Optionally, the method can include the following steps:
[0102] 402 : Acquire a first exposure image and a second exposure image captured by a camera, wherein the exposure time corresponding to the first exposure image is greater than the exposure time corresponding to the second exposure image.
[0103] 404 : Determine sharpness values corresponding to the first exposure image and the second exposure image, respectively, based on the first exposure image and the second exposure image.
[0104] In an embodiment of the present application, the electronic device can determine the image edge strength of each first object included in the first exposure image, and determine the average value of the image edge strength of each first object as the sharpness value of the first exposure image; and determine the image edge strength of each second object included in the second exposure image, and determine the average value of the image edge strength of each second object as the sharpness value of the second exposure image.
[0105] Optionally, the electronic device may extract the edges of each first object included in the first exposure image through an edge extraction operator, and determine the image edge intensity of each first object according to the first extraction result; optionally, the electronic device may extract the edges of each second object included in the second exposure image through an edge extraction operator, and determine the image edge intensity of each second object according to the second extraction result.
[0106] Optionally, the edge extraction operator may include: sobel operator, laplace operator, or DOG operator, etc., which is not limited herein.
[0107] Exemplarily, please refer to Figure 5 , Figure 5 is a schematic diagram of extracting the image edge disclosed in the embodiment of the present application. Among them, Figure 5 (a) is the original image, Figure 5 (b) is the image after edge extraction.
[0108] Implementing the above method, the image edge intensity can be considered approximately equal to the sharpness value, so that the difficulty of determining the sharpness values corresponding to the first exposure image and the second exposure image respectively can be reduced, and further the implementation difficulty of this method can be reduced.
[0109] As an optional implementation manner, considering that the image edge intensity is affected by the image brightness, and the brightness of the first exposure image and the second exposure image is usually different. To avoid the influence of different brightness on the statistical image edge intensity. The electronic device may perform a brightening process on the second exposure image according to the exposure amount ratio between the first exposure image and the second exposure image, so that the brightness of the second exposure image is aligned with the brightness of the first exposure image; then the electronic device may determine the sharpness values corresponding to the first exposure image and the second exposure image respectively according to the first exposure image and the second exposure image with aligned image brightness.
[0110] Optionally, the electronic device may determine the exposure amount ratio between the first exposure image and the second exposure image through an objective function.
[0111] Optionally, the objective function may include "shutter*sensorgain", where: "shutter*sensorgain" represents the product of the shutter time (Shutter Speed) and the sensor gain (Sensor Gain, usually corresponding to ISO). This product can approximately reflect the total exposure amount (Exposure Value, EV) of the image and can be used to quantify the image brightness.
[0112] By implementing the above method, the electronic device can brighten the second exposure image with a darker brightness to align its brightness with that of the first exposure image. A brighter image can determine a more accurate image edge intensity, thereby improving the accuracy of determining the sharpness values corresponding to the first exposure image and the second exposure image respectively based on the first exposure image and the second exposure image whose brightnesses are aligned later.
[0113] 406. Determine the sharpness difference information between the first exposure image and the second exposure image according to the sharpness values corresponding to the first exposure image and the second exposure image respectively; determine the image blur information of the first exposure image according to the sharpness difference information.
[0114] In the embodiments of the present application, the sharpness difference information between the first exposure image and the second exposure image may include: the result of dividing the sharpness value of the second exposure image by the sharpness value of the first exposure image; the result of dividing the sharpness value of the first exposure image by the sharpness value of the second exposure image; or the subtraction result of the sharpness value of the second exposure image and the sharpness value of the first exposure image, etc., which is not limited herein.
[0115] Optionally, when the sharpness difference information between the first exposure image and the second exposure image includes the result of dividing the sharpness value of the second exposure image by the sharpness value of the first exposure image, if the sharpness difference information is greater than the first difference threshold, it is determined that the image blur information of the first exposure image is greater than the first blur threshold; if the sharpness difference information is less than the second difference threshold, it is determined that the image blur information of the first exposure image is less than the second blur threshold. Wherein, the first difference threshold is greater than the second difference threshold; the first blur threshold is greater than the second blur threshold. That is, if the result of dividing the sharpness value of the second exposure image by the sharpness value of the first exposure image is greater than a certain threshold, it is determined that the image blur degree of the first exposure image is higher, and vice versa.
[0116] Since the exposure time of the second exposure image is short, the second exposure image is usually relatively clear. By implementing the above method, the second exposure image with clear image can be used as a reference, and then based on the sharpness difference information between the first exposure image and the second exposure image, the image blur information of the first exposure image can be determined. This method is simple and efficient, reduces the implementation difficulty of the method, and thus improves the implementation efficiency of the method.
[0117] 408. Perform a fusion process on the first exposure image and the second exposure image according to the image blur information of the first exposure image to obtain a target image.
[0118] By implementing the methods disclosed in the above embodiments, a first exposure image and a second exposure image captured by a camera can be obtained, where the exposure duration corresponding to the first exposure image is greater than that corresponding to the second exposure image; furthermore, the in-frame motion information of the first exposure image, and / or the sharpness values respectively corresponding to the first exposure image and the second exposure image can be determined based on the first exposure image and the second exposure image; and the image blur information of the first exposure image can be determined based on the in-frame motion information of the first exposure image, and / or the sharpness values respectively corresponding to the first exposure image and the second exposure image. It can be seen that the embodiments of the present application can determine the image blur information of the first exposure image through multiple factors, avoiding the situation where the inaccurate determination of the image blur information caused by the low accuracy of a single factor. Furthermore, subsequently, the fusion processing of the first exposure image and the second exposure image can be guided based on the accurate image blur information, thereby improving the fusion effect of the images;
[0119] In addition, the second exposure image with a darker brightness can be brightened to align with the brightness of the first exposure image, and a brighter image can determine a more accurate image edge intensity, thereby improving the accuracy of determining the sharpness values respectively corresponding to the first exposure image and the second exposure image based on the first exposure image and the second exposure image with aligned image brightness; in addition, the image blur information of the first exposure image can be determined based on the sharpness difference information between the first exposure image and the second exposure image. This method is simple and efficient, reduces the implementation difficulty of the method, and further improves the implementation efficiency of the method.
[0120] Please refer to Figure 6 , Figure 6 which is a schematic flowchart of another image processing method disclosed in the embodiments of the present application. Optionally, this method can be applied to various electronic devices with image processing capabilities, or other execution entities, which are not limited herein. Optionally, this method may include the following steps:
[0121] Obtain a first exposure image, a second exposure image, and angular velocity information, where the angular velocity information includes the angular velocity of the camera during the exposure of the first exposure image;
[0122] Align the brightness of the first exposure image and the second exposure image, and then calculate the sharpness value and the image transformation mapping information based on the first exposure image and the second exposure image with aligned image brightness;
[0123] Determine the target angular velocity according to the exposure duration of the first exposure image and the angular velocity information; where the target angular velocity and the image blur information of the first exposure image can have a positive correlation;
[0124] Optionally, according to the exposure start time point, the motion start point of the camera can be determined from the angular velocity information. Then, based on the exposure duration of the first exposure image and the motion start point, the angular velocity information during the exposure duration is integrated to obtain the target angular velocity, which is the angular velocity of the camera's motion during the exposure of the first exposure image.
[0125] Furthermore, it can be determined whether the sharpness value, the image transformation mapping information, and the target angular velocity are respectively less than the corresponding first thresholds. If so, the first exposure image and the second exposure image are normally fused. If not, it is determined whether the sharpness value, the image transformation mapping information, and the target angular velocity are respectively less than the corresponding second thresholds. If so, the first exposure image and the second exposure image are fused, and the fusion edge is smoothed. If not, only the second exposure image is fused (i.e., the first exposure image is discarded and only the second exposure image is retained).
[0126] It should be noted that the first thresholds and the second thresholds corresponding to the sharpness value, the image transformation mapping information, and the target angular velocity may be different, and they can be set by developers according to a large amount of development experience, which is not limited here.
[0127] Since the target angular velocity is sensor data, there are problems with low accuracy and it is affected by the anti-shake algorithm. The image transformation mapping information is affected by the image alignment accuracy, and the formula 1 introduced above for determining the image transformation mapping information assumes that the motion of the mobile phone during shooting is linear, but in fact, there may be non-linear motion, resulting in inaccurate determined image transformation mapping information. In addition, the sharpness value is affected by the different noise distributions of the first exposure image and the second exposure image.
[0128] Implementing the above method can comprehensively judge the image blur information of the first exposure image based on three factors. This judgment method can better prevent false detection, thereby improving the subsequent image fusion effect.
[0129] Please refer to Figure 7 , Figure 7 which is a schematic structural diagram of an image processing device disclosed in an embodiment of the present application. Optionally, the device can be applied to various electronic devices with image processing capabilities, or other execution entities, which is not limited here. Optionally, the device may include a first acquisition unit 702, a first determination unit 704, a second determination unit 706, and a fusion unit 708, where:
[0130] The first acquisition unit 702 is configured to acquire a first exposure image and a second exposure image collected by the camera, and the exposure duration corresponding to the first exposure image is greater than the exposure duration corresponding to the second exposure image.
[0131] The first determination unit 704 is configured to determine the intra-frame motion information of the first exposure image and / or the sharpness values respectively corresponding to the first exposure image and the second exposure image according to the first exposure image and the second exposure image;
[0132] The second determination unit 706 is configured to determine the image blur information of the first exposure image according to the intra-frame motion information of the first exposure image and / or the sharpness values respectively corresponding to the first exposure image and the second exposure image;
[0133] The fusion unit 708 is configured to perform a fusion process on the first exposure image and the second exposure image according to the image blur information to obtain a target image.
[0134] By implementing the above device, the first exposure image and the second exposure image collected by the camera can be obtained, where the exposure duration corresponding to the first exposure image is greater than the exposure duration corresponding to the second exposure image; furthermore, the intra-frame motion information of the first exposure image and / or the sharpness values respectively corresponding to the first exposure image and the second exposure image can be determined according to the first exposure image and the second exposure image; and the image blur information of the first exposure image can be determined according to the intra-frame motion information of the first exposure image and / or the sharpness values respectively corresponding to the first exposure image and the second exposure image. It can be seen that the embodiments of the present application can determine the image blur information of the first exposure image through multiple factors, avoiding the situation where the inaccurate determination of the image blur information is caused by the low accuracy of a single factor. Furthermore, subsequently, the accurate image blur information can be used to guide the fusion process of the first exposure image and the second exposure image, thereby improving the fusion effect of the image.
[0135] As an optional implementation manner, the intra-frame motion information includes the intra-frame motion distance corresponding to each pixel point in the first exposure image; the second determination unit 706 is further configured to determine the first quantity of target pixel points in the first exposure image according to the intra-frame motion distance corresponding to each pixel point in the first exposure image, where the target pixel points are pixel points with an intra-frame motion distance greater than the distance threshold; and determine the image blur information of the first exposure image according to the first quantity of the target pixel points.
[0136] By implementing the above device, the degree of motion intensity of the first exposure image during the exposure can be determined according to the first quantity of target pixel points with relatively intense motion in the first exposure image, and then the image blur information of the first exposure image can be determined. This method only requires simple statistics and is easy to implement, thereby reducing the implementation difficulty of this method.
[0137] As an alternative implementation, the second determination unit 706 is further configured to determine sharpness difference information between the first exposure image and the second exposure image according to the sharpness values respectively corresponding to the first exposure image and the second exposure image; and determine image blur information of the first exposure image according to the sharpness difference information.
[0138] Since the exposure time of the second exposure image is short, the second exposure image is usually clearer. By implementing the above device, the clearer second exposure image can be used as a reference, and then based on the sharpness difference information between the first exposure image and the second exposure image, the image blur information of the first exposure image can be determined. This method is simple and efficient, reduces the implementation difficulty of the method, and thus improves the implementation efficiency of the method.
[0139] As an alternative implementation, the first determination unit 704 is further configured to perform image matching on the first exposure image and the second exposure image to obtain image transformation mapping information, where the image transformation mapping information represents the distance that each pixel point in the first exposure image needs to move to the corresponding position in the second exposure image; determine inter-frame motion information between the first exposure image and the second exposure image according to the image transformation mapping information, where the inter-frame motion information represents the distance that the global area or a partial area of the first exposure image needs to move to the corresponding position in the second exposure image; and determine intra-frame motion information of the first exposure image according to the exposure durations respectively corresponding to the first exposure image and the second exposure image, and the inter-frame motion information.
[0140] By implementing the above device, the inter-frame motion information between the first exposure image and the second exposure image can be calculated first, and then the intra-frame motion information of the first exposure image can be determined by using the easily obtained inter-frame motion information in combination with the exposure durations of the first exposure image and the second exposure image. This method is simple and efficient, and reduces the implementation difficulty of the method.
[0141] As an alternative implementation, the first determination unit 704 is further configured to calculate the product of the inter-frame motion information and a proportionality coefficient to obtain the intra-frame motion information of the first exposure image, where the proportionality coefficient is determined according to the exposure durations respectively corresponding to the first exposure image and the second exposure image.
[0142] By implementing the above device, the inter-frame motion information between the first exposure image and the second exposure image can be calculated first, and then the intra-frame motion information of the first exposure image can be determined by using the easily obtained inter-frame motion information in combination with the exposure durations of the first exposure image and the second exposure image. This method is simple and efficient, and reduces the implementation difficulty of the method.
[0143] As an alternative implementation, Figure 7 The device shown may further include a brightening unit (not shown), where:
[0144] The brightening unit is configured to brighten the second exposure image according to the exposure amount ratio between the first exposure image and the second exposure image before determining the sharpness values corresponding to the first exposure image and the second exposure image respectively based on the first exposure image and the second exposure image, so that the brightness of the second exposure image is aligned with the brightness of the first exposure image;
[0145] Moreover, the first determination unit 704 is further configured to determine the sharpness values corresponding to the first exposure image and the second exposure image respectively based on the first exposure image and the second exposure image with aligned image brightness.
[0146] By implementing the above device, the second exposure image with a darker brightness can be brightened to align with the brightness of the first exposure image, and a brighter image can determine a more accurate image edge intensity, thereby improving the accuracy of subsequently determining the sharpness values corresponding to the first exposure image and the second exposure image respectively based on the first exposure image and the second exposure image with aligned image brightness.
[0147] As an optional implementation manner, Figure 7 The illustrated device may further include a second acquisition unit (not shown), where:
[0148] The second acquisition unit is configured to acquire a target angular velocity before determining the image blur information of the first exposure image based on the in-frame motion information of the first exposure image and / or the sharpness values corresponding to the first exposure image and the second exposure image respectively. The target angular velocity is the angular velocity at which the camera moves during the exposure of the first exposure image;
[0149] Moreover, the second determination unit 706 is further configured to determine the image blur information of the first exposure image based on the in-frame motion information of the first exposure image, the sharpness values corresponding to the first exposure image and the second exposure image respectively, and the target angular velocity.
[0150] By implementing the above device, three factors including the in-frame motion information of the first exposure image, the sharpness values corresponding to the first exposure image and the second exposure image respectively, and the target angular velocity can be comprehensively used to judge the image blur information of the first exposure image. This judgment method can better prevent misdetection, thereby improving the subsequent image fusion effect.
[0151] As an optional implementation manner, the fusion unit 708 is further configured to perform a fusion process on the first exposure image and the second exposure image to obtain a target image when the image blur information is less than a first threshold; and if the image blur information is greater than the first threshold and less than a second threshold (the second threshold is greater than the first threshold), perform a fusion on the first exposure image and the second exposure image and perform a smoothing process on the fusion edge of the first exposure image and the second exposure image to obtain a target image.
[0152] When the above device is implemented and the image blur information of the first exposure image is less than the first threshold, it indicates that the blur degree of the first exposure image is relatively low. At this time, when fusing with the second exposure image, it is highly unlikely to have the problem of "the clarity of the fused image being discontinuous" introduced above. In this regard, the electronic device can perform a fusion process on the first exposure image and the second exposure image to obtain a target image with a higher dynamic range, improving the image quality of the target image; and, when the electronic device fuses the first exposure image and the second exposure image, it can perform a smoothing process on the fusion edge of the first exposure image and the second exposure image to make the fusion edge transition more naturally, avoiding the problem of "the clarity of the fused image being discontinuous" and improving the image quality of the subsequent obtained target image.
[0153] As an alternative implementation Figure 7 The device shown may further include a third determination unit (not shown), where:
[0154] The third determination unit is configured to determine the second exposure image as the target image when the image blur information is greater than the second threshold.
[0155] When the above device is implemented and the image blur information of the first exposure image is greater than the second threshold, the electronic device can determine that the first exposure image has a relatively serious blur. If forced fusion is performed, it may lead to the problem of "the clarity of the fused image being discontinuous". In this regard, the electronic device can discard the first exposure image and determine the second exposure image as the target image, thereby improving the image quality of the target image.
[0156] Please refer to Figure 8 , Figure 8 which is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application. As shown in Figure 8 , the electronic device may include:
[0157] A memory 801 storing executable program code;
[0158] A processor 802 coupled to the memory 801;
[0159] Among them, the processor 802 calls the executable program code stored in the memory 801 to execute the image processing method disclosed in the above embodiments.
[0160] An embodiment of the present application discloses a computer-readable storage medium that stores a computer program, where the computer program causes a computer to execute the image processing method disclosed in the above embodiments.
[0161] The embodiments of the present application also disclose an application release platform. The application release platform is used to release computer program products. When the computer program products run on a computer, the computer is caused to execute some or all of the steps of the methods in the above method embodiments.
[0162] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, the "in one embodiment" or "in an embodiment" that appears throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. Those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to the present application.
[0163] In various embodiments of the present application, it should be understood that the magnitude of the sequence numbers of the above processes does not necessarily mean the inevitable sequence of execution. The execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0164] The units described as separate components above may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0165] In addition, in each embodiment of the present application, the functional units can be integrated in a processing unit, or each unit exists physically alone, or two or more units are integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0166] If the above 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-accessible memory. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a memory and includes several requests for causing a computer device (which can be a personal computer, a server or a network device, etc., specifically, the processor in the computer device) to execute some or all of the steps of the above methods in the various embodiments of the present application.
[0167] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program, and this program can be stored in a computer-readable storage medium. The storage medium includes read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc memories, magnetic disc memories, tape memories, or any other medium that can be used to carry or store data and is computer-readable.
[0168] The above has introduced in detail the image processing method and apparatus, electronic device, and computer-readable storage medium disclosed in the embodiments of the present application. Specific examples are used in this article to elaborate on the principles and implementation manners of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. An image processing method, characterized in that, The method includes: Obtaining a first exposure image and a second exposure image collected by a camera, where the exposure duration corresponding to the first exposure image is greater than the exposure duration corresponding to the second exposure image; Determining, based on the first exposure image and the second exposure image, the in-frame motion information of the first exposure image, and / or the sharpness values respectively corresponding to the first exposure image and the second exposure image; Determining the image blur information of the first exposure image based on the in-frame motion information of the first exposure image, and / or the sharpness values respectively corresponding to the first exposure image and the second exposure image; Performing a fusion process on the first exposure image and the second exposure image according to the image blur information to obtain a target image.
2. The method according to claim 1, wherein The in-frame motion information includes the in-frame motion distance corresponding to each pixel point in the first exposure image; the determining the image blur information of the first exposure image based on the in-frame motion information of the first exposure image includes: Determining a first quantity of target pixel points in the first exposure image according to the in-frame motion distance corresponding to each pixel point in the first exposure image, where the target pixel points are pixel points with an in-frame motion distance greater than a distance threshold; Determining the image blur information of the first exposure image according to the first quantity of the target pixel points.
3. The method according to claim 1, wherein The determining the image blur information of the first exposure image based on the sharpness values respectively corresponding to the first exposure image and the second exposure image includes: Determining the sharpness difference information between the first exposure image and the second exposure image according to the sharpness values respectively corresponding to the first exposure image and the second exposure image; Determining the image blur information of the first exposure image according to the sharpness difference information.
4. The method according to claim 1, wherein The determining the in-frame motion information of the first exposure image based on the first exposure image and the second exposure image includes: Performing image matching on the first exposure image and the second exposure image to obtain image transformation mapping information, where the image transformation mapping information represents the distance that each pixel point in the first exposure image needs to move to a corresponding position in the second exposure image; Determining the inter-frame motion information between the first exposure image and the second exposure image according to the image transformation mapping information, where the inter-frame motion information represents the distance that the global region or a partial region of the first exposure image needs to move to a corresponding position in the second exposure image; Determining the in-frame motion information of the first exposure image according to the exposure durations respectively corresponding to the first exposure image and the second exposure image, and the inter-frame motion information.
5. The method according to claim 4, wherein The determining the in-frame motion information of the first exposure image according to the exposure durations respectively corresponding to the first exposure image and the second exposure image, and the inter-frame motion information includes: Calculating the product of the inter-frame motion information and a proportionality coefficient to obtain the in-frame motion information of the first exposure image, where the proportionality coefficient is determined according to the exposure durations respectively corresponding to the first exposure image and the second exposure image.
6. The method according to claim 1, characterized in that, Before determining the sharpness values corresponding to the first exposure image and the second exposure image respectively according to the first exposure image and the second exposure image, the method further includes: Performing a brightening process on the second exposure image according to the exposure amount ratio between the first exposure image and the second exposure image, so that the brightness of the second exposure image is aligned with the brightness of the first exposure image; The determining the sharpness values corresponding to the first exposure image and the second exposure image respectively according to the first exposure image and the second exposure image includes: Determining the sharpness values corresponding to the first exposure image and the second exposure image respectively according to the first exposure image and the second exposure image with aligned image brightness.
7. The method according to claim 1, characterized in that Before determining the image blur information of the first exposure image according to the in-frame motion information of the first exposure image, and / or the sharpness values corresponding to the first exposure image and the second exposure image respectively, the method further includes: Obtaining a target angular velocity, where the target angular velocity is the angular velocity of the camera during the exposure of the first exposure image; And, the determining the image blur information of the first exposure image according to the in-frame motion information of the first exposure image, and / or the sharpness values corresponding to the first exposure image and the second exposure image respectively includes: Determining the image blur information of the first exposure image according to the in-frame motion information of the first exposure image, the sharpness values corresponding to the first exposure image and the second exposure image respectively, and the target angular velocity.
8. The method according to any one of claims 1 to 7, characterized in that The performing a fusion process on the first exposure image and the second exposure image according to the image blur information to obtain a target image includes: If the image blur information is less than a first threshold, performing a fusion process on the first exposure image and the second exposure image to obtain a target image; If the image blur information is greater than the first threshold and less than a second threshold, fusing the first exposure image and the second exposure image and smoothing the fusion edge of the first exposure image and the second exposure image to obtain a target image, where the second threshold is greater than the first threshold.
9. The method according to any one of claims 1 to 7, characterized in that The method further includes: If the image blur information is greater than the second threshold, determining the second exposure image as the target image.
10. An image processing apparatus, characterized in that, The device includes: A first acquisition unit, configured to acquire a first exposure image and a second exposure image collected by a camera, where the exposure duration corresponding to the first exposure image is greater than the exposure duration corresponding to the second exposure image; A first determination unit, configured to determine the in-frame motion information of the first exposure image, and / or the sharpness values corresponding to the first exposure image and the second exposure image respectively according to the first exposure image and the second exposure image; A second determination unit, configured to determine the image blur information of the first exposure image according to the in-frame motion information of the first exposure image, and / or the sharpness values corresponding to the first exposure image and the second exposure image respectively; A fusion unit, configured to perform a fusion process on the first exposure image and the second exposure image according to the image blur information to obtain a target image.
11. An electronic device, characterized in that, Comprising a memory storing executable program code, and a processor coupled to the memory; wherein, the processor invokes the executable program code stored in the memory to execute the method according to any one of claims 1 to 9.
12. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1 to 9.