Image fusion method, electronic device and storage medium
By acquiring long-exposure images and short-exposure images, determining the contribution rate of each pixel position and performing weight fusion, the image quality problem caused by camera dynamic range limitation is solved, and high-quality and efficient image fusion is achieved.
Patent Information
- Application Number
- CN202111031156.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-03
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2041-09-03
AI Technical Summary
The prior art is difficult to effectively solve the overexposure or underexposure areas caused by dynamic range limitations when a camera acquires images, resulting in loss of image details and poor visual effects.
By acquiring long-exposure images and short-exposure images, their contribution rate in image fusion is determined for each pixel position, and the target image is synthesized using the weight fusion method.
High-quality image fusion is achieved, artifacts and pseudo-boundaries are reduced, and the smoothness and visual effects of the image are improved. At the same time, the calculation amount is small, which can achieve efficient real-time fusion.
Smart Images

Figure CN113674193B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of image processing, and in particular to an image fusion method, an electronic device and a storage medium. Background Art
[0002] The dynamic range (DR) of brightness in real scenes is usually greater than the dynamic range of the camera. When the camera captures an image, a single exposure can only record a portion of the dynamic range in the real scene. Therefore, the captured image often has overexposed or underexposed areas, resulting in the loss of scene detail information and poor image visual effects.
[0003] The methods described in this section are not necessarily methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have been recognized in any prior art. Summary of the invention
[0004] The present disclosure provides an image fusion method, an electronic device and a storage medium to achieve high-quality and efficient image fusion.
[0005] According to one aspect of the present disclosure, an image fusion method is provided. The method includes: obtaining a first image and a second image shot for the same scene, the exposure time of the first image is greater than the exposure time of the second image, and the first image and the second image respectively include a plurality of first pixel values and a plurality of second pixel values corresponding to a plurality of pixel positions; according to the first image, determining a first weight of the first pixel value and a second weight of the second pixel value of each pixel position; and according to the corresponding first weight and second weight, respectively fusing the first pixel value and the second pixel value of each pixel position to obtain a target image.
[0006] According to another aspect of the present disclosure, an electronic device is provided, which includes: a processor; and a memory storing a program, wherein the program includes instructions, and when the instructions are executed by the processor, the processor executes the above method.
[0007] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing a program is provided. The program includes instructions, which, when executed by a processor of an electronic device, cause the electronic device to execute the above method.
[0008] According to another aspect of the present disclosure, a computer program product is provided, which includes a computer program, and when the computer program is executed by a processor, the above method is implemented.
[0009] According to an embodiment of the present disclosure, the first image and the second image are respectively a long exposure image and a short exposure image taken for the same scene, and the two images respectively include a plurality of first pixel values and a plurality of second pixel values corresponding to a plurality of pixel positions. According to the long exposure image, the contribution rate of the long exposure image and the short exposure image at each pixel position to the image fusion is determined, that is, the first weight of the first pixel value and the second weight of the second pixel value at each pixel position are determined, and the first weight and the second weight of different pixel positions are different, so as to realize the adaptive fusion of the pixel values at different pixel positions, so that the pixel value of the fused target image is smoother and the image quality is higher.
[0010] The brightness of long exposure images is usually higher, which is more in line with the visual needs of the human eye. Determining the contribution rate of long exposure images and short exposure images to image fusion based on long exposure images can make the fused target image present a good visual effect.
[0011] Furthermore, the image fusion solution of the embodiment of the present disclosure has a small amount of computation and can achieve efficient and real-time image fusion.
[0012] These and other aspects of the disclosure will be apparent from and elucidated with reference to the embodiments described hereinafter. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0014] Figure 1 is a flow chart illustrating an image fusion method according to an exemplary embodiment;
[0015] Figure 2 is a comparison diagram showing a target image fused according to an exemplary embodiment and an image fused using a related art;
[0016] Figure 3 is a schematic diagram illustrating an image fusion process according to an exemplary embodiment; and
[0017] Figure 4 is a block diagram illustrating an example of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0018] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.
[0019] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.
[0020] The dynamic range of brightness in real scenes is usually greater than the dynamic range of the camera, so a single image captured by the camera through a single exposure often has overexposed areas or underexposed areas. The brightness of the overexposed area is too high, and the brightness of the underexposed area is too low, resulting in the inability to distinguish the image details in the overexposed area and the underexposed area, resulting in poor visual effects of the image.
[0021] In order to improve the visual effect of the image, multiple images of the same real scene can be collected through multiple exposures, each image contains a different dynamic range in the real scene. Then, the multiple images are fused to obtain a high dynamic range (HDR) image.
[0022] In related technologies, commonly used image fusion methods mainly include the following two:
[0023] One is an image fusion method based on the inverse camera response process. The core of this method is to calculate the response curve of the camera during exposure (the horizontal axis of the response curve is usually the brightness value of the real scene, and the vertical axis is the pixel value of the image), and synthesize the images under different exposures by inversely transforming the response curve to the real brightness value. Although this method conforms to the physical principle of the camera and can effectively restore the details lost during the camera imaging process, it requires the camera response curve to be calibrated in advance. The response curves of different cameras and sensors are different. If the camera or sensor is replaced, the response curve needs to be corrected or recalibrated, which is inconvenient to operate and has low calculation efficiency. In addition, the HDR image obtained in this way usually has residual artifacts and relatively poor local contrast.
[0024] The other method is to directly fuse images at different exposures to generate an HDR image. This method does not consider the physical parameters of the camera itself and does not require the calibration of the camera's response curve. However, when the exposure times of the multiple images to be fused differ too much, the overexposed area of the long-exposure image may correspond to the underexposed area of the short-exposure image, resulting in uneven pixel values in the fused image, prone to artifacts or pseudo-boundaries, and poor image quality.
[0025] In view of the problems existing in the related art, the present disclosure provides an image fusion method, an electronic device and a storage medium to achieve high-quality and efficient image fusion. The embodiments of the present disclosure are described in detail below in conjunction with the accompanying drawings.
[0026] Figure 1 A flowchart of an image fusion method 100 according to an embodiment of the present disclosure is shown.
[0027] The method 100 may be executed in an electronic device, that is, the execution subject of the method 100 is an electronic device. The electronic device may be a fixed computer device such as a desktop computer, a server computer, or a mobile computer device such as a mobile phone, a tablet computer, a smart wearable device (such as a smart watch, a smart head-mounted device, etc.). In some embodiments, the electronic device may also be a camera with computing capabilities. In other embodiments, the electronic device may be an auxiliary reading device.
[0028] like Figure 1 As shown, the method 100 includes:
[0029] Step S110, acquiring a first image and a second image shot for the same scene, wherein the exposure time of the first image is greater than the exposure time of the second image, and the first image and the second image respectively include a plurality of first pixel values and a plurality of second pixel values corresponding to a plurality of pixel positions;
[0030] Step S120, determining a first weight of a first pixel value and a second weight of a second pixel value at each pixel position according to the first image; and
[0031] Step S130: According to the corresponding first weight and second weight, the first pixel value and the second pixel value of each pixel position are respectively fused to obtain a target image.
[0032] According to an embodiment of the present disclosure, the first image and the second image are respectively a long exposure image and a short exposure image taken for the same scene, and the two images respectively include a plurality of first pixel values and a plurality of second pixel values corresponding to a plurality of pixel positions. According to the long exposure image, the contribution rate of the long exposure image and the short exposure image at each pixel position to the image fusion is determined, that is, the first weight of the first pixel value and the second weight of the second pixel value at each pixel position are determined, and the first weight and the second weight of different pixel positions are different, so as to realize the adaptive fusion of the pixel values at different pixel positions, so that the pixel values of the fused target image are smoother and the image quality is higher. The brightness of the long exposure image is usually higher, which is more in line with the visual requirements of the human eye. According to the long exposure image, the contribution rate of the long exposure image and the short exposure image to the image fusion is determined, so that the fused target image can present a good visual effect. In addition, the image fusion method of the embodiment of the present disclosure has a small amount of calculation and can realize efficient and real-time image fusion.
[0033] Each step of the method 100 is described in detail below.
[0034] In step S110, a first image and a second image taken for the same scene are acquired, the exposure time of the first image is greater than the exposure time of the second image, and the first image and the second image respectively include multiple first pixel values and multiple second pixel values corresponding to multiple pixel positions.
[0035] According to some embodiments, the first image and the second image may be obtained by photographing the same scene by the same or different cameras, and then transmitted to the electronic device for executing the method 100. Accordingly, the electronic device executes step S110 to obtain the first image and the second image.
[0036] The first image and the second image taken for the same scene may be two different images taken by the camera at the same position at a short time interval. It is understandable that since the position of the camera has not changed, the contents captured in the first image and the second image are substantially the same. The first image and the second image may be taken respectively by using different exposure parameters.
[0037] In an embodiment of the present disclosure, the exposure time of the first image is greater than the exposure time of the second image. That is, the first image is a long-exposure image, and the second image is a short-exposure image. Accordingly, the first image is visually presented as brighter than the second image.
[0038] According to some embodiments, a plurality of images with different exposure times may be captured by the same camera for the same scene, and then two images are selected from the images, and the image with the longer exposure time of the two images is used as the first image, and the image with the shorter exposure time is used as the second image. Furthermore, in order to achieve a better fusion effect of the first image and the second image, and a higher quality of the fused target image, according to some embodiments, the first image and the second image may be selected from the plurality of images according to the response curve of the camera that captures the plurality of images.
[0039] In an embodiment of the present disclosure, the first image includes a plurality of first pixel values respectively corresponding to a plurality of pixel positions, and the second image includes a plurality of second pixel values respectively corresponding to a plurality of pixel positions.
[0040] The pixel position can be represented by two-dimensional coordinates (x, y), for example. The pixel value (including the first pixel value and the second pixel value) can be, for example, the grayscale value of the pixel, or the channel value of different image channels (such as R, G, B values of R, G, B channels, or Y, U, V values of Y, U, V channels, etc.).
[0041] Each pixel position corresponds to a first pixel value and a second pixel value in the first image. For example, the pixel position (x, y) corresponds to a first pixel value with coordinates (x, y) in the first image and a second pixel value with coordinates (x, y) in the second image. It should be noted that in an embodiment of the present disclosure, the size of the first image and the second image (i.e., the number of pixels included in the width direction and the number of pixels included in the length direction) are the same. In some embodiments, if the size of the original acquired image corresponding to the first image and the second image is different, the original acquired image can be scaled to obtain a first image and a second image having the same size.
[0042] In step S120 , based on the first image, a first weight of the first pixel value and a second weight of the second pixel value of each pixel position are determined.
[0043] The first image is a long-exposure image with high brightness. Compared with the dim short-exposure image (second image), the human eye has a better visual experience of the brighter long-exposure image. The first weight of the first pixel value and the second weight of the second pixel value at each pixel position are determined according to the first image, that is, the contribution rate of the long-exposure image and the short-exposure image to the image fusion is determined by the long-exposure image, so that the fused target image meets the visual requirements of the human eye and presents a good visual effect.
[0044] In the embodiments of the present disclosure, image fusion is performed in units of pixels. That is, for each pixel position, the first pixel value and the second pixel value of the pixel position are fused to obtain a fused pixel value. Then, the fused pixel values of multiple pixel positions are combined to obtain a fused image. According to some embodiments, the fused image can be directly used as the target image. Alternatively, according to other embodiments, the fused image can be further processed (such as the filtering process of the fused image described below) to obtain the target image.
[0045] The first weight and the second weight are used to characterize the contribution of the first pixel value and the second pixel value to the fusion, respectively. For example, if the first weight is greater than the second weight, the first pixel value contributes more to the fusion, and the fused pixel value will be obtained by referring more to the first pixel value.
[0046] According to some embodiments, for any first pixel value, the larger the first pixel value is, the smaller the first weight of the first pixel value is.
[0047] The larger the first pixel value, the closer the corresponding pixel position is to the overexposed area. By setting the first weight inversely proportional to the first pixel value, the larger the first pixel value, the smaller the first weight, that is, the smaller the contribution of the first pixel value to the fusion, so that the pixel value of the overexposed area in the long exposure image can be suppressed during image fusion, making the fused target image smoother, avoiding faults or pseudo boundaries, and ensuring that the target image presents a good visual effect.
[0048] According to some embodiments, the sum of the first weight of the first pixel value and the second weight of the second pixel value corresponding to the same pixel position is a predetermined value (e.g., 1). Accordingly, the contribution of the first pixel value and the second pixel value to the fusion can be balanced. The smaller the first weight, the larger the second weight. For example, when the first pixel value is located in the overexposed area of the first image, the first weight can be set to a smaller value, and correspondingly, the second weight (i.e., 1 minus the first weight) is a larger value, so that the pixel values in the long exposure image are suppressed during image fusion, and the pixel values in the short exposure image are considered more, so that the fused target image is smoother, avoiding faults or pseudo boundaries, and presenting a good visual effect.
[0049] Specifically, there are many ways to determine the first weight and the second weight.
[0050] According to some embodiments, for any pixel position, a first weight of the pixel position may be determined based on the first pixel value of the pixel position and the minimum pixel value in the first image (i.e., the minimum value of multiple first pixel values included in the first image). Furthermore, a second weight of the pixel position may be further determined based on the determined first weight.
[0051] According to some embodiments, the first weight of a pixel position is determined based on a relative pixel value range between a first pixel value of the pixel position and a minimum pixel value of the first image and a preset pixel value range determined based on the minimum pixel value.
[0052] The relative pixel value range may be, for example, the difference between the first pixel value and the minimum pixel value. For another example, the relative pixel value range may also be determined by the ratio of the first pixel value to the minimum pixel value.
[0053] The preset pixel value range may be a first constant determined based on the minimum pixel value, for example, it may be a difference between a first constant greater than the minimum pixel value and the minimum pixel value. Similarly, the preset pixel value range may also be determined by the ratio of the first constant to the minimum pixel value. Without departing from the principles of the present disclosure, those skilled in the art may use various mathematical tools to process and determine the relative pixel value range and the preset pixel value range.
[0054] The first weight and the second weight can be determined according to the following formula (1) and formula (2):
[0055]
[0056]
[0057] Where w1(x,y) is the first weight of the pixel position with coordinates (x,y), w2(x,y) is the second weight of the pixel position with coordinates (x,y), and I LE is the first image, I LE (x, y) is the first pixel value at the pixel position with coordinates (x, y), min(I LE ) is the minimum pixel value of the first image, α and β are preset constants greater than zero, and min(I LE )<α≤max(I LE ), max(I LE ) is the maximum pixel value of the first image (ie, the maximum value of a plurality of first pixel values included in the first image). β is usually an integer greater than 1, for example, 1 or 2.
[0058] In the above formulas (1) and (2), I LE (x,y)-min(I LE ) is the relative pixel value range between the first pixel value and the minimum pixel value, α-min(I LE ) is the preset pixel value range determined based on the minimum pixel value.
[0059] It should be noted that in α <max(I LE), the first weight w1(x,y) calculated based on the above formula (1) may be a negative number (when I LE (x, y)>α). When the first weight w1(x, y) is a negative number, based on the above formula (2), the corresponding second weight w2(x, y) is greater than 1. In other embodiments, it is also possible to set the second weight w2(x, y) to be greater than 1 based on formula (1) and formula (2). LE When (x, y)>α, the value of the first weight w1(x, y) is 0, and the value of the second weight w2(x, y) is 1, that is, the first weight and the second weight are determined according to the following formula (3) and formula (4):
[0060]
[0061]
[0062] According to some other embodiments, for any pixel position, a first weight of the pixel position may be determined based on the first pixel value of the pixel position and the maximum pixel value in the first image, and a second weight of the pixel position may be further determined based on the determined first weight.
[0063] According to some embodiments, the first weight of a pixel position is determined based on a relative pixel value range between a maximum pixel value of the first image and a first pixel value of the pixel position and a preset pixel value range determined based on the maximum pixel value.
[0064] The relative pixel value range may be, for example, the difference between the maximum pixel value and the first pixel value. For another example, the relative pixel value range may also be determined by the ratio of the maximum pixel value to the first pixel value. The preset pixel value range may be a second constant determined based on the maximum pixel value, for example, it may be the difference between the maximum pixel value and a second constant that is smaller than the maximum pixel value. Similarly, the predetermined pixel value range may also be determined by the ratio of the maximum pixel value to the second constant. Without departing from the principles of the present disclosure, those skilled in the art may use various mathematical tools to process and determine the relative pixel value range and the predetermined pixel value range.
[0065] Accordingly, the first weight and the second weight may be determined according to the following formula (5) and formula (6):
[0066]
[0067]
[0068] Where w1(x,y) is the first weight of the pixel position with coordinates (x,y), w2(x,y) is the second weight of the pixel position with coordinates (x,y), and I LE is the first image, ILE (x, y) is the first pixel value at the pixel position with coordinates (x, y), max(I LE ) is the maximum pixel value of the first image, α and β are preset constants greater than zero, and min(I LE )≤α <max(I LE ), min(I LE ) is the minimum pixel value of the first image. β is usually an integer greater than 1, for example, it can be 1 or 2.
[0069] In the above formulas (5) and (6), max(I LE )-I LE (x, y) is the relative pixel value range between the maximum pixel value and the first pixel value, max(I LE )-α is the preset pixel value range determined based on the maximum pixel value.
[0070] It should be noted that when α>min(I LE ), the first weight w1(x,y) calculated based on the above formula (5) may be greater than 1 (when I LE (x, y)<α). When the first weight w1(x, y) is greater than 1, based on the above formula (6), the corresponding second weight w2(x, y) is less than 0. In other embodiments, it is also possible to set the second weight w2(x, y) to be less than 0 based on formula (5) and formula (6). LE When (x, y)<α, the value of the first weight w1(x, y) is 1, and the value of the second weight w2(x, y) is 0. That is, the first weight and the second weight are determined according to the following formula (7) and formula (8):
[0071]
[0072]
[0073] In step S130, the first pixel value and the second pixel value at each pixel position are fused according to the corresponding first weight and the second weight, so as to obtain a target image.
[0074] According to some embodiments, step S130 further comprises:
[0075] Step S132, performing brightness compensation on the second pixel value according to the exposure parameters of the first image and the second image;
[0076] Step S134, fusing the first pixel value and the compensated second pixel value according to the first weight and the second weight to obtain a fused image of the first image and the second image; and
[0077] Step S136: determine the target image based on the fused image.
[0078] With respect to step S132, according to some embodiments, a brightness compensation coefficient may be determined according to the exposure parameters of the first image and the second image; and brightness compensation may be performed on the second pixel value according to the brightness compensation coefficient. For example, the second pixel value may be multiplied by the brightness compensation coefficient to obtain a compensated second pixel value.
[0079] According to some embodiments, the exposure parameters include exposure time and exposure gain, and the brightness compensation coefficient is the quotient of the product of the exposure time and exposure gain of the first image and the product of the exposure time and exposure gain of the second image. That is, the brightness compensation coefficient is calculated according to the following formula (9):
[0080]
[0081] Where ratio is the brightness compensation coefficient, t1 and g1 are the exposure time and exposure gain of the first image, and t2 and g2 are the exposure time and exposure gain of the second image, respectively.
[0082] With respect to step S134, according to some embodiments, a weighted sum may be performed on the first pixel value and the compensated second pixel value according to the first weight and the second weight to achieve fusion of the first pixel value and the second pixel value.
[0083] That is, the first pixel value and the compensated second pixel value can be fused according to the following formula (10-1):
[0084] I Fuse (x,y)=w1(x,y)×I LF (x,y)+w2(x,y)×(ratio×I SE (x,y)) (10-1)
[0085] In the formula, I Fuse (x,y),I LE (x,y),I SE (x,y) are the fused pixel value, the first pixel value and the second pixel value of the pixel position with coordinates (x,y), w1(x,y) and w2(x,y) are the first weight and the second weight of the pixel position with coordinates (x,y), and ratio is the brightness compensation coefficient.
[0086] According to some other embodiments, the first pixel value and the compensated second pixel value may be fused by the following steps: logarithmically transforming the first pixel value and the compensated second pixel value to obtain a first logarithmic pixel value and a second logarithmic pixel value; and weighted summing the first logarithmic pixel value and the second logarithmic pixel value according to a first weight and a second weight. That is, the first pixel value and the compensated second pixel value may be fused according to the following formula (10-2):
[0087] I Fuse (x,y)=w1(x,y)×log(I LE (x,y))+w2(x,y)×log(ratio×I SE (x,y)) (10-2)
[0088] In the formula, I Fuse (x,y),I LE (x,y),I SE (x, y) are the fused pixel value, the first pixel value, and the second pixel value of the pixel position with coordinates (x, y), respectively. log(I LE (x,y))、log(ratio×I SE (x, y)) are the first logarithmic pixel value and the second logarithmic pixel value, w1(x, y) and w2(x, y) are the first weight and the second weight of the pixel position with coordinates (x, y), and ratio is the brightness compensation coefficient.
[0089] Based on the above formula (10-1) or (10-2), the fused pixel value of each pixel position can be obtained. The fused pixel values of each pixel position are combined in the same image to obtain a fused image of the first image and the second image.
[0090] According to the embodiments of the present disclosure, image fusion can be achieved by performing simple mathematical operations (such as addition, subtraction, multiplication and division) on the pixel values of the first image and the second image, which has a small amount of calculation, high calculation efficiency and can achieve real-time image fusion.
[0091] After obtaining the fused image of the first image and the second image through step S134, step S136 may be performed to determine the target image based on the fused image.
[0092] In step S136 , according to some embodiments, the fused image may be directly used as the target image.
[0093] Figure 2 A comparison diagram of a fused image (ie, a target image) obtained by fusion according to an embodiment of the present disclosure and an image obtained by fusion according to a camera response curve is shown.
[0094] like Figure 2 As shown, the first image 210 is a long exposure image, and there is a bright overexposed area in the middle of the image. The second image 220 is a short exposure image, which is darker as a whole and the image details are difficult to distinguish. According to the image fusion method of the embodiment of the present disclosure, the first image 210 and the second image 220 are fused to obtain a fused image (target image) 230. According to the image fusion method based on the camera response curve in the related art, the first image 210 and the second image 220 are fused to obtain an image 240. Figure 2 As shown, there is an obvious pseudo boundary 242 in the middle of the image 240 obtained by fusion based on the camera response curve, the image quality is not high, and the visual effect is poor. In the fused image (target image) 230 obtained by fusion based on the embodiment of the present disclosure, the position corresponding to the pseudo boundary 242 is smoother, there is no obvious pseudo boundary, and the image quality and visual effect are obviously better than the image 240.
[0095] According to other embodiments, the multiple fused pixel values included in the fused image may be further normalized to the interval [0, 1], and the normalized image may be used as the target image to avoid data overflow or loss due to the fused pixel value being too large or too small, thereby affecting the image quality. According to some embodiments, each fused pixel value may be normalized to the interval [0, 1] by dividing by the maximum value of the multiple fused pixel values.
[0096] According to some other embodiments, the fused image (or the normalized fused image) may be processed through the following steps to obtain a target image: filtering the fused image to obtain a texture feature map, an edge feature map, and an illumination feature map of the target image; and obtaining the target image based on the texture feature map, the edge feature map, and the illumination feature map.
[0097] According to some embodiments, the texture feature map of the target image can be obtained by the following steps: filtering the fused image to decompose the fused image into a first basic feature map (B1) and a first detail feature map (D1); and edge-preservingly compressing the first detail feature map (D1) to obtain a texture feature map (FD1).
[0098] In the above embodiment, a multi-scale edge preserving decomposition (MSEPD) algorithm can be used to filter the fused image using an edge preserving filter operator, wherein the edge preserving filter operator can be used for image processing to decompose the image into a basic feature map and a detail feature map. The edge preserving filter operator can be any edge preserving filter operator such as a bilateral filter operator, a guided filter operator, etc. By using the image processing method of multi-scale edge preserving decomposition, features of different scales in the image can be extracted without downsampling the image. The first basic feature map (B1) and the first detail feature map (D1) can be obtained using the following formulas (11) and (12):
[0099] B1=MSEPD(I Fuse ,r1) (11)
[0100] D1=I Fuse -B1 (12)
[0101] In the formula, I Fuse is the fused image (or the normalized fused image), r1 is the side length of the filter window (correspondingly, the size of the filter window is r1×r1), MSEPD(I Fuse , r1) represents the filtering window of size r1×r1 using the MSEPD algorithm to filter the fused image I Fuse Filtering is performed, B1 and D1 are the first basic feature map and the first detail feature map respectively.
[0102] The first detail feature map D1 obtained according to the above embodiment contains a large amount of texture detail information and noise. In order to ensure that the final target image presents good texture details, the first detail feature map D1 needs to be compressed or maintained in a small amount, that is, the first detail feature map D1 is edge-preserving compressed to obtain the texture feature map FD1.
[0103] According to some embodiments, a Sigmoid function may be used to perform edge-preserving compression on the first detail feature map D1 to obtain a texture feature map FD1. That is, the following formula (13) is used to perform edge-preserving compression on the first detail feature map D1:
[0104] FD1=Sigmoid(D1,δ1)=1 / (1+exp(-δ1×D1)) (13)
[0105] Wherein, D1 and FD1 are the first detail feature map and texture feature map respectively, exp represents an exponential function with the natural constant e as the base, and δ1 is a preset constant.
[0106] According to some embodiments, the edge feature map of the target image can be obtained by the following steps: filtering the first basic feature map (B1) to decompose the first basic feature map (B1) into a second basic feature map (B2) and a second detail feature map (D2); and edge-preservingly compressing the second detail feature map (D2) to obtain an edge feature map (FD2).
[0107] In the above embodiment, the MSEPD algorithm can be used to filter the first basic feature map, and the filtering process can be expressed as the following formulas (14) and (15):
[0108] B2=MSEPD(B1,r2) (14)
[0109] D2=B1-B2 (15)
[0110] In the formula, B1 is the first basic feature map, r2 is the side length of the filter window (correspondingly, the size of the filter window is r2×r2), MSEPD(B1, r2) means that the first basic feature map B1 is filtered using the MSEPD algorithm and a filter window of size r2×r2, B2 and D2 are the second basic feature map and the second detail feature map, respectively.
[0111] The second detail feature map D2 obtained according to the above embodiment contains edge contour information of the object, which needs to be subjected to edge-preserving compression to obtain an edge feature map FD2.
[0112] According to some embodiments, a Sigmoid function may be used to perform edge-preserving compression on the second detail feature map D2 to obtain an edge feature map FD2. That is, the following formula (16) is used to perform edge-preserving compression on the second detail feature map D2:
[0113] FD2=Sigmoid(D2,δ2)=1 / (1+exp(-δ2×D2)) (16)
[0114] Wherein, D2 and FD2 are the second detail feature map and the edge feature map respectively, exp represents an exponential function with the natural constant e as the base, and δ2 is a preset constant. It can be understood that the value of δ2 can be the same as or different from the value of δ1 in formula (13).
[0115] According to some embodiments, the illumination feature map of the target image can be obtained by the following steps: filtering the second basic feature map (B2) to decompose the third basic feature map (B3) from the second basic feature map (B2); and enhancing the third basic feature map (B3) to obtain the illumination feature map (GB).
[0116] In the above embodiment, the MSEPD algorithm can be used to filter the second basic feature map, and the filtering process can be expressed as the following formula (17):
[0117] B3=MSEPD(B2,r3) (17)
[0118] In the formula, B2 is the second basic feature map, r3 is the side length of the filtering window (correspondingly, the size of the filtering window is r3×r3), MSEPD(B2, r3) means that the second basic feature map B2 is filtered using the MSEPD algorithm and a filtering window of size r3×r3, and B3 is the third basic feature map.
[0119] The third basic feature map B3 obtained according to the above embodiment contains illumination information, which can be enhanced to obtain an illumination feature map GB, thereby improving the brightness and contrast of the target image.
[0120] According to some embodiments, the third basic feature map B3 may be subjected to a Gamma transformation to obtain the illumination feature map GB. That is, the third basic feature map B3 may be enhanced using the following formula (18):
[0121] GB=Gamma(B3)=(B3) γ (18)
[0122] Wherein, B3 and GB are the third basic feature map and the illumination feature map respectively, and γ is the preset index in the Gamma transformation.
[0123] After the texture feature map, edge feature map and illumination feature map are obtained through filtering, the texture feature map, edge feature map and illumination feature map can be weighted and summed to obtain the target image. That is, the target image can be obtained according to the following formula (19):
[0124] I Obj =w1×FD1+w2×FD2+w3×GB (19)
[0125] Wherein, w1, w2, and w3 are weights of the texture feature map FD1, the edge feature map FD2, and the illumination feature map GB, respectively, and the values of the three can be set by those skilled in the art according to actual conditions.
[0126] According to an embodiment of the present disclosure, by filtering the fused image to obtain a texture feature map, an edge feature map, and an illumination feature map, and obtaining a target image based on the texture feature map, the edge feature map, and the illumination feature map, the brightness and contrast of the target image can be improved, thereby improving the quality of the target image and making the target image present a good visual effect.
[0127] In addition, the embodiments of the present disclosure use the MSEPD algorithm to implement filtering. There is no downsampling or upsampling operation during the filtering process. At the same time, the size of the filter window can be flexibly set according to the amount of calculation (that is, the values of r1, r2, and r3 are set). The calculation efficiency is high, and efficient and real-time image fusion and display can be achieved.
[0128] Figure 3 FIG. 3 is a schematic diagram of an image fusion process 300 according to an embodiment of the present disclosure.
[0129] like Figure 3 As shown, in step S350, the long exposure image 310 and the short exposure image 312 are fused to obtain a fused image 314. The fused image 314 can be obtained, for example, through the aforementioned steps S110, S120, S132, and S134.
[0130] In step S352 , the fused image 314 is filtered using the MSEPD algorithm to decompose the fused image 314 into a first basic feature map 316 and a first detail feature map 318 .
[0131] In step S354 , the Sigmoid function is used to perform edge-preserving compression on the first detail feature map 318 to obtain a texture feature map 320 .
[0132] In step S356 , the first basic feature map 316 is filtered using the MSEPD algorithm to decompose the first basic feature map 316 into a second basic feature map 322 and a second detail feature map 324 .
[0133] In step S358, the Sigmoid function is used to perform edge-preserving compression on the second detail feature map 324 to obtain the edge feature map 326. It can be understood that the Sigmoid function used in step S358 may be different from the Sigmoid function used in step S354.
[0134] In step S360 , the second basic feature map 322 is filtered using the MSEPD algorithm to decompose the third basic feature map 328 from the second basic feature map 322 .
[0135] In step S362 , a gamma transformation is performed on the third basic feature map 328 to obtain a lighting feature map 330 .
[0136] In step S364, a weighted sum is performed on the texture feature map 320, the edge feature map 326, and the illumination feature map 330 to obtain a target image 332. The target image 332 is the result image of this image fusion.
[0137] According to an embodiment of the present disclosure, an image fusion device is also provided. The image fusion device may include an image acquisition unit, a weight determination unit, and a fusion unit, wherein the image acquisition unit may be configured to acquire a first image and a second image taken for the same scene, the exposure time of the first image is greater than the exposure time of the second image, and the first image and the second image respectively include a plurality of first pixel values and a plurality of second pixel values corresponding to a plurality of pixel positions. The weight determination unit may be configured to determine a first weight of a first pixel value and a second weight of a second pixel value at each pixel position based on the first image. The fusion unit may be configured to fuse the first pixel value and the second pixel value at each pixel position based on the corresponding first weight and second weight, respectively, to obtain a target image.
[0138] Here, the operations of the above-mentioned units of the image fusion device are similar to the operations of steps S110 to S130 described above, and are not repeated here. According to another aspect of the present disclosure, there is also provided an electronic device, including: a processor; and a memory storing a program, wherein the program includes instructions, and when the instructions are executed by the processor, the processor executes the above-mentioned image fusion method.
[0139] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing a program is also provided. The program includes instructions, which, when executed by a processor of an electronic device, cause the electronic device to perform the above-mentioned image fusion method.
[0140] According to another aspect of the present disclosure, a computer program product is also provided, including a computer program, and when the computer program is executed by a processor, the image fusion method described above is implemented.
[0141] See also Figure 4 , an electronic device 400 will now be described, which is an example of a hardware device (electronic device) that can be applied to various aspects of the present disclosure. The electronic device 400 can be any machine configured to perform processing and / or computing, and can be, but is not limited to, a workstation, a server, a desktop computer, a laptop computer, a tablet computer, a personal digital assistant, a robot, a smart phone, a vehicle-mounted computer, or any combination thereof. The above-mentioned image fusion method 100 can be implemented in whole or in part by the electronic device 400 or a similar device or system.
[0142] The electronic device 400 may include an element connected to or in communication with the bus 402 (possibly via one or more interfaces). For example, the electronic device 400 may include a bus 402, one or more processors 404, one or more input devices 406, and one or more output devices 408. The one or more processors 404 may be any type of processor, and may include, but are not limited to, one or more general-purpose processors and / or one or more special-purpose processors (e.g., special processing chips). The input device 406 may be any type of device capable of inputting information to the electronic device 400, and may include, but are not limited to, a mouse, a keyboard, a touch screen, a microphone, and / or a remote controller. The output device 408 may be any type of device capable of presenting information, and may include, but are not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The electronic device 400 may also include a non-transitory storage device 410, which may be any storage device that is non-transitory and can enable data storage, including but not limited to a disk drive, an optical storage device, a solid-state memory, a floppy disk, a flexible disk, a hard disk, a magnetic tape or any other magnetic medium, an optical disk or any other optical medium, a ROM (read-only memory), a RAM (random access memory), a cache memory and / or any other memory chip or cartridge, and / or any other medium from which a computer can read data, instructions and / or code. The non-transitory storage device 410 may be removable from the interface. The non-transitory storage device 410 may have data / programs (including instructions) / code for implementing the above-mentioned methods and steps. The electronic device 400 may also include a communication device 412. The communication device 412 may be any type of device or system that enables communication with an external device and / or with a network, and may include but is not limited to a modem, a network card, an infrared communication device, a wireless communication device and / or a chipset, such as Bluetooth TM devices, 1302.11 devices, Wi-Fi devices, Wi-Max devices, cellular communication devices, and / or the like.
[0143] The electronic device 400 may also include a working memory 414, which may be any type of working memory that may store programs (including instructions) and / or data useful for the operation of the processor 404, and may include but is not limited to random access memory and / or read-only memory devices.
[0144] The software elements (programs) may be located in the working memory 414, including but not limited to an operating system 416, one or more application programs 418, drivers and / or other data and codes. Instructions for executing the above methods and steps may be included in one or more application programs 418, and the above image fusion method 100 may be implemented by the processor 404 reading and executing the instructions of one or more application programs 418. More specifically, in the above image fusion method 100, steps S110-S130 may be implemented, for example, by the processor 404 executing an application program 418 having instructions for steps S110-S130. In addition, other steps in the above image fusion method 100 may be implemented, for example, by the processor 404 executing an application program 418 having instructions for executing the corresponding steps. The executable code or source code of the instructions of the software elements (programs) may be stored in a non-transitory computer-readable storage medium (such as the above storage device 410), and may be stored in the working memory 414 (possibly compiled and / or installed) when executed. The executable code or source code of the instructions of the software elements (programs) may also be downloaded from a remote location.
[0145] It should also be understood that various modifications may be made according to specific requirements. For example, custom hardware may also be used, and / or specific elements may be implemented in hardware, software, firmware, middleware, microcode, hardware description language, or any combination thereof. For example, some or all of the disclosed methods and apparatus may be implemented by programming hardware (e.g., programmable logic circuits including field programmable gate arrays (FPGAs) and / or programmable logic arrays (PLAs)) in assembly language or hardware programming languages (such as VERILOG, VHDL, C++) using logic and algorithms according to the present disclosure.
[0146] It should also be understood that the foregoing method can be implemented through a server-client model. For example, the client can receive data input by the user and send the data to the server. The client can also receive data input by the user, perform a portion of the processing in the foregoing method, and send the processed data to the server. The server can receive data from the client, and execute the foregoing method or another portion of the foregoing method, and return the execution result to the client. The client can receive the execution result of the method from the server, and present it to the user, for example, through an output device.
[0147] It should also be understood that the components of the electronic device 400 can be distributed over a network. For example, one processor can be used to perform some processing, while other processing can be performed by another processor remote from the one processor. Other components of the computing system 400 can also be distributed similarly. In this way, the electronic device 400 can be interpreted as a distributed computing system that performs processing at multiple locations.
[0148] Some exemplary aspects of the disclosure are described below.
[0149] Aspect 1. An image fusion method, comprising:
[0150] Acquire a first image and a second image captured for the same scene, wherein an exposure time of the first image is greater than an exposure time of the second image, and the first image and the second image respectively include a plurality of first pixel values and a plurality of second pixel values corresponding to a plurality of pixel positions;
[0151] Determining, based on the first image, a first weight of a first pixel value and a second weight of a second pixel value at each pixel position; and
[0152] Based on the corresponding first weight and second weight, the first pixel value and the second pixel value of each pixel position are fused respectively to obtain a target image.
[0153] Aspect 2. The method according to aspect 1, wherein, for any first pixel value, the larger the first pixel value is, the smaller the first weight of the first pixel value is.
[0154] Aspect 3. The method according to aspect 1, wherein the sum of the first weight corresponding to the first pixel value and the second weight corresponding to the second pixel value at the same pixel position is 1.
[0155] Aspect 4. A method according to any one of Aspects 1-3, wherein, for any pixel position, the first weight of the pixel position is determined based on the first pixel value of the pixel position and the minimum pixel value in the first image.
[0156] Aspect 5. A method according to Aspect 4, wherein the first weight of the pixel position is determined based on a relative pixel value range between the first pixel value of the pixel position and the minimum pixel value and a preset pixel value range determined based on the minimum pixel value.
[0157] Aspect 6. The method according to any one of aspects 1 to 5, wherein the first weight and the second weight are determined according to the following formula:
[0158]
[0159]
[0160] Wherein, w1(x,y) is the first weight of the pixel position with coordinates (x,y), w2(x,y) is the second weight of the pixel position with coordinates (x,y), and I LE is the first image, I LE(x, y) is the first pixel value at the pixel position with coordinates (x, y), min(I LE ) is the minimum pixel value in the first image, α and β are preset constants greater than zero, and min(I LE )<α≤max(I LE ), max(I LE ) is the maximum pixel value in the first image.
[0161] Aspect 7. A method according to any one of Aspects 1 to 3, wherein, for any pixel position, the first weight of the pixel position is determined based on the first pixel value of the pixel position and the maximum pixel value in the first image.
[0162] Aspect 8. A method according to Aspect 7, wherein the first weight of the pixel position is determined based on a relative pixel value range between the maximum pixel value and the first pixel value of the pixel position and a preset pixel value range determined based on the maximum pixel value.
[0163] Aspect 9. The method according to any one of aspects 1-3, 7-8, wherein the first weight and the second weight are determined according to the following formula:
[0164]
[0165]
[0166] Wherein, w1(x,y) is the first weight of the pixel position with coordinates (x,y), w2(x,y) is the second weight of the pixel position with coordinates (x,y), and I LE is the first image, I LE (x, y) is the first pixel value at the pixel position with coordinates (x, y), max(I LE ) is the maximum pixel value in the first image, α and β are preset constants greater than zero, and min(I LE )≤α <max(I LE ), min(I LE ) is the minimum pixel value in the first image.
[0167] Aspect 10. The method according to any one of aspects 1 to 9, wherein, based on the corresponding first weight and second weight, respectively fusing the first pixel value and the second pixel value at each pixel position to obtain the target image comprises:
[0168] Performing brightness compensation on the second pixel value based on exposure parameters of the first image and the second image;
[0169] Based on the first weight and the second weight, fusing the first pixel value and the compensated second pixel value to obtain a fused image of the first image and the second image; and
[0170] The target image is determined based on the fused image.
[0171] Aspect 11. The method according to aspect 10, wherein, based on exposure parameters of the first image and the second image, performing brightness compensation on the second pixel value comprises:
[0172] determining a brightness compensation coefficient based on exposure parameters of the first image and the second image; and
[0173] Brightness compensation is performed on the second pixel value according to the brightness compensation coefficient.
[0174] Aspect 12. The method according to aspect 11, wherein the exposure parameters include exposure time and exposure gain, and
[0175] The brightness compensation coefficient is the quotient of the product of the exposure time and exposure gain of the first image and the product of the exposure time and exposure gain of the second image.
[0176] Aspect 13. The method according to any one of aspects 10 to 12, wherein, based on the first weight and the second weight, fusing the first pixel value and the compensated second pixel value comprises:
[0177] performing logarithmic transformation on the first pixel value and the compensated second pixel value respectively to obtain a first logarithmic pixel value and a second logarithmic pixel value; and
[0178] Based on the first weight and the second weight, a weighted sum is performed on the first logarithmic pixel value and the second logarithmic pixel value.
[0179] Clause 14. The method according to any one of Clauses 10 to 13, wherein the fused image comprises a plurality of fused pixel values corresponding to the plurality of pixel positions,
[0180] The method further includes: normalizing the multiple fused pixel values to the interval [0, 1].
[0181] Aspect 15. According to the method of any one of Aspects 10 to 14, determining the target image based on the fused image comprises:
[0182] Filtering the fused image to obtain a texture feature map, an edge feature map, and an illumination feature map of the target image; and
[0183] The target image is obtained based on the texture feature map, the edge feature map and the illumination feature map.
[0184] Aspect 16. The method according to aspect 15, wherein filtering the fused image to obtain the texture feature map of the target image comprises:
[0185] filtering the fused image to decompose the fused image into a first basic feature map and a first detail feature map; and
[0186] The first detail feature map is subjected to edge-preserving compression to obtain the texture feature map.
[0187] Aspect 17. The method according to aspect 16, wherein filtering the fused image to obtain the edge feature map of the target image comprises:
[0188] filtering the first basic feature map to decompose the first basic feature map into a second basic feature map and a second detail feature map; and
[0189] The second detail feature map is subjected to edge-preserving compression to obtain the edge feature map.
[0190] Aspect 18. The method according to aspect 17, wherein filtering the fused image to obtain the illumination feature map of the target image comprises:
[0191] filtering the second basic feature map to decompose a third basic feature map from the second basic feature map; and
[0192] The third basic feature map is enhanced to obtain the illumination feature map.
[0193] Aspect 19. The method according to any one of Aspects 15 to 18, wherein obtaining the target image based on the texture feature map, the edge feature map, and the illumination feature map comprises:
[0194] A weighted sum is performed on the texture feature map, the edge feature map, and the illumination feature map to obtain the target image.
[0195] Aspect 20. The method according to any one of aspects 15 to 19, wherein the filtering is implemented using an edge-preserving filtering operator.
[0196] Aspect 21. An electronic device comprising:
[0197] Processor; and
[0198] A memory storing a program, the program comprising instructions which, when executed by the processor, cause the processor to perform a method according to any one of aspects 1-20.
[0199] Aspect 22. A non-transitory computer-readable storage medium storing a program, the program comprising instructions, which, when executed by a processor of an electronic device, cause the electronic device to perform a method according to any one of aspects 1-20.
[0200] Aspect 23. A computer program product, comprising a computer program, wherein the computer program implements the method according to any one of aspects 1-20 when executed by a processor.
[0201] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but only by the claims after authorization and their equivalent scope. Various elements in the embodiments or examples can be omitted or replaced by their equivalent elements. In addition, each step can be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples can be combined in various ways. It is important that with the evolution of technology, many elements described herein can be replaced by equivalent elements that appear after the present disclosure.
Claims
1. An image fusion method, comprising: Acquire a first image and a second image captured for the same scene, wherein an exposure time of the first image is greater than an exposure time of the second image, and the first image and the second image respectively include a plurality of first pixel values and a plurality of second pixel values corresponding to a plurality of pixel positions; Determining, based on the first image, a first weight of a first pixel value and a second weight of a second pixel value at each pixel position; as well as Based on the corresponding first weight and second weight, the first pixel value and the second pixel value of each pixel position are respectively fused to obtain a target image, including: Performing brightness compensation on the second pixel value based on exposure parameters of the first image and the second image; Based on the first weight and the second weight, fusing the first pixel value and the compensated second pixel value to obtain a fused image of the first image and the second image; and The target image is determined based on the fused image.
2. The method according to claim 1, wherein: For any first pixel value, the larger the first pixel value is, the smaller the first weight of the first pixel value is.
3. The method according to claim 1, wherein: The sum of the first weight of the first pixel value and the second weight of the second pixel value corresponding to the same pixel position is 1.
4. The method according to any one of claims 1 to 3, wherein: For any pixel position, a first weight of the pixel position is determined based on a first pixel value of the pixel position and a minimum pixel value in the first image.
5. The method according to claim 4, wherein: The first weight of the pixel position is determined based on a relative pixel value range between the first pixel value of the pixel position and the minimum pixel value and a preset pixel value range determined based on the minimum pixel value.
6. The method according to any one of claims 1 to 3, wherein: The first weight and the second weight are determined according to the following formula: Wherein, w1(x,y) is the first weight of the pixel position with coordinates (x,y), w2(x,y) is the second weight of the pixel position with coordinates (x,y), and I LE is the first image, I LE (x, y) is the first pixel value at the pixel position with coordinates (x, y), min(I LE ) is the minimum pixel value in the first image, α and β are preset constants greater than zero, and min(I LE )<α≤max(I LE ), max(I LE ) is the maximum pixel value in the first image.
7. The method according to any one of claims 1 to 3, wherein: For any pixel position, the first weight of the pixel position is determined based on the first pixel value of the pixel position and the maximum pixel value in the first image.
8. The method according to claim 7, wherein: The first weight of the pixel position is determined based on a relative pixel value range between the maximum pixel value and the first pixel value of the pixel position and a preset pixel value range determined based on the maximum pixel value.
9. The method according to any one of claims 1 to 3, wherein: The first weight and the second weight are determined according to the following formula: Wherein, w1(x,y) is the first weight of the pixel position with coordinates (x,y), w2(x,y) is the second weight of the pixel position with coordinates (x,y), and I LE is the first image, I LE (x, y) is the first pixel value at the pixel position with coordinates (x, y), max(I LE ) is the maximum pixel value in the first image, α and β are preset constants greater than zero, and min(I LE )≤α <max(I LE ), min(I LE ) is the minimum pixel value in the first image.
10. The method according to claim 1, wherein: Based on the exposure parameters of the first image and the second image, performing brightness compensation on the second pixel value includes: determining a brightness compensation coefficient based on exposure parameters of the first image and the second image; and Brightness compensation is performed on the second pixel value according to the brightness compensation coefficient.
11. The method according to claim 10, wherein: The exposure parameters include exposure time and exposure gain, and The brightness compensation coefficient is the quotient of the product of the exposure time and exposure gain of the first image and the product of the exposure time and exposure gain of the second image.
12. The method according to any one of claims 1 to 3, wherein: Based on the first weight and the second weight, fusing the first pixel value and the compensated second pixel value includes: performing logarithmic transformation on the first pixel value and the compensated second pixel value respectively to obtain a first logarithmic pixel value and a second logarithmic pixel value; and Based on the first weight and the second weight, a weighted sum is performed on the first logarithmic pixel value and the second logarithmic pixel value.
13. The method according to any one of claims 1 to 3, wherein: The fused image includes a plurality of fused pixel values corresponding to the plurality of pixel positions, The method further includes: normalizing the multiple fused pixel values to the interval [0, 1].
14. The method according to any one of claims 1 to 3, wherein determining the target image based on the fused image comprises: Filtering the fused image to obtain a texture feature map, an edge feature map, and an illumination feature map of the target image; as well as The target image is obtained based on the texture feature map, the edge feature map and the illumination feature map.
15. The method according to claim 14, wherein: Filtering the fused image to obtain a texture feature map of the target image includes: filtering the fused image to decompose the fused image into a first basic feature map and a first detail feature map; and The first detail feature map is subjected to edge-preserving compression to obtain the texture feature map.
16. The method according to claim 15, wherein: Filtering the fused image to obtain an edge feature map of the target image includes: filtering the first basic feature map to decompose the first basic feature map into a second basic feature map and a second detail feature map; and The second detail feature map is subjected to edge-preserving compression to obtain the edge feature map.
17. The method according to claim 16, wherein: Filtering the fused image to obtain the illumination feature map of the target image includes: filtering the second basic feature map to decompose a third basic feature map from the second basic feature map; and The third basic feature map is enhanced to obtain the illumination feature map.
18. The method according to claim 14, wherein: Obtaining the target image based on the texture feature map, the edge feature map, and the illumination feature map includes: A weighted sum is performed on the texture feature map, the edge feature map, and the illumination feature map to obtain the target image.
19. The method according to claim 14, wherein: The filtering is implemented by using an edge-preserving filtering operator.
20. An electronic device, comprising: processor; as well as A memory storing a program, the program comprising instructions which, when executed by the processor, cause the processor to perform a method according to any one of claims 1-19.
21. A non-transitory computer-readable storage medium storing a program, the program comprising instructions, which, when executed by a processor of an electronic device, cause the electronic device to perform the method according to any one of claims 1-19.
22. A computer program product comprising a computer program, wherein: The computer program implements the method according to any one of claims 1-19 when executed by a processor.
Citation Information
Patent Citations
Image fusion method and device, electronic equipment and readable storage medium
CN112418279A