Image processing method, device, electronic device and computer readable storage medium
Through the iterative fusion processing method, the participation proportion of the reference image frame in the multi-frame image algorithm is gradually reduced, which solves the problem of low image quality caused by poor reference frame image quality in the multi-frame image algorithm, and significantly improves the accuracy of images captured by electronic equipment. quality.
Patent Information
- Application Number
- CN202110944813.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-17
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2041-08-17
AI Technical Summary
The existing multi-frame image algorithm leads to the problem of poor output image quality when the reference frame image quality is poor.
By determining the reference image frame and multiple non-reference image frames from multiple image frames to be processed, an iterative fusion processing method is used to gradually reduce the participation proportion of the reference image frame in the fusion process and reduce its adverse impact on the final image quality. , improve image quality.
It effectively reduces the adverse impact of the reference image frame in the final target image frame and improves the image quality. Especially when the reference image frame quality is poor, the clarity and noise suppression effect of the output image are significantly improved.
Smart Images

Figure CN113674189B
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image processing method, device, electronic device and computer-readable storage medium. Background Art
[0002] With the rapid development of image capture technology, it has become increasingly common for users to use electronic devices with built-in cameras such as smart phones and digital cameras to capture images. How to improve the image quality of images captured by electronic devices has also become an issue that users and manufacturers are increasingly concerned about.
[0003] In related technologies, image quality is generally improved through multi-frame image algorithms. Multi-frame image algorithms refer to an electronic device continuously taking multiple images, using one as a reference frame and the rest as non-reference frames, and then registering and fusing each non-reference frame based on the reference frame, and then fusing the multiple non-reference frames after registration and fusion to obtain the final output image.
[0004] However, the above-mentioned method of improving image quality has the problem of poor quality of output images. Summary of the invention
[0005] The embodiments of the present application provide an image processing method, device, electronic device and computer-readable storage medium, which can improve the image quality of images taken by the electronic device.
[0006] In a first aspect, an image processing method is provided, the method comprising:
[0007] Determining a reference image frame and n non-reference image frames from a plurality of image frames to be processed, where n is a positive integer greater than 1;
[0008] Performing iterative fusion processing on the reference image frame based on the n non-reference image frames to obtain a target image frame;
[0009] Among them, the kth fusion processing process in the iterative fusion processing includes: fusing the intermediate image frame with the kth non-reference image frame among the n non-reference image frames, k is a positive integer greater than or equal to 1 and less than or equal to n, when k=1, the intermediate image frame is the reference image frame, and when k>1, the intermediate image frame is the image frame obtained by the k-1th fusion processing.
[0010] In a second aspect, an image processing device is provided, the device comprising:
[0011] A determination module, used to determine a reference image frame and n non-reference image frames from a plurality of image frames to be processed, where n is a positive integer greater than 1;
[0012] A processing module, configured to perform iterative fusion processing on the reference image frame based on the n non-reference image frames to obtain a target image frame;
[0013] Among them, the kth fusion processing process in the iterative fusion processing includes: fusing the intermediate image frame with the kth non-reference image frame among the n non-reference image frames, k is a positive integer greater than or equal to 1 and less than or equal to n, when k=1, the intermediate image frame is the reference image frame, and when k>1, the intermediate image frame is the image frame obtained by the k-1th fusion processing.
[0014] In a third aspect, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the image processing method of the first aspect is implemented.
[0015] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the image processing method as described in the first aspect is implemented.
[0016] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0017] A reference image frame and n non-reference image frames are determined from a plurality of image frames to be processed, where n is a positive integer greater than 1, and then, the reference image frame is iteratively fused based on the n non-reference image frames to obtain a target image frame, wherein the k-th fusion process in the iterative fusion process includes: fusing an intermediate image frame with a k-th non-reference image frame among the n non-reference image frames, where k is a positive integer greater than or equal to 1 and less than or equal to n, and when k=1, the intermediate image frame is the reference image frame, and when k>1, the intermediate image frame is an image frame obtained by the k-1-th fusion process. In this way, as the number of iterations increases, the participation ratio of the reference image frame in each fusion process decreases successively, and therefore, the influence of the image quality of the reference image frame on the image quality of the image frame obtained by each fusion process is also gradually reduced. Therefore, in the case where the image quality of the reference image frame is poor, the adverse influence of the reference image frame on the image quality of the target image frame finally obtained can be effectively reduced, thereby improving the image quality of the target image frame. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1is a flowchart of an image processing method in one embodiment;
[0020] Figure 2 is a flowchart of fusing an intermediate image frame with a kth non-reference image frame in another embodiment;
[0021] Figure 3 is a flow chart of step 202 in another embodiment;
[0022] Figure 4 is a flowchart of step 302 in another embodiment;
[0023] Figure 5 is a flowchart of step 302 in another embodiment;
[0024] Figure 6 is a flowchart of fusing an intermediate image frame with a kth non-reference image frame in another embodiment;
[0025] Figure 7 is a schematic diagram of an exemplary image processing effect;
[0026] Figure 8 is a schematic diagram of another exemplary image processing effect;
[0027] Fig. 9 is a flowchart of fusing an intermediate image frame with a kth non-reference image frame in another embodiment;
[0028] Fig.10 is a structural block diagram of an image processing device in one embodiment;
[0029] Fig.11 FIG. 1 is a schematic diagram of the internal structure of an electronic device in an embodiment. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0031] In conventional technology, a multi-frame image algorithm is used to improve the image quality of images output by electronic devices. Specifically, the electronic device continuously captures multiple images, uses one of them as a reference frame, and the rest as non-reference frames. Then, the reference frame is used as a fixed reference to perform registration and fusion on each non-reference frame, and then the multiple non-reference frames after registration and fusion are fused to obtain the final output image. However, the problem with conventional technology is that when the image quality of the reference frame is poor, since each non-reference frame is registered and fused based on the reference frame, the image quality of each non-reference frame after registration and fusion is poor, which results in poor image quality of the final output of the electronic device.
[0032] In view of this, an embodiment of the present application provides an image processing method, in which a reference image frame and n non-reference image frames are determined from multiple image frames to be processed, where n is a positive integer greater than 1, and then, the reference image frame is iteratively fused based on the n non-reference image frames to obtain a target image frame, wherein the kth fusion process in the iterative fusion process includes: fusing an intermediate image frame with a kth non-reference image frame among the n non-reference image frames, where k is a positive integer greater than or equal to 1 and less than or equal to n, when k=1, the intermediate image frame is the reference image frame, and when k>1, the intermediate image frame is an image frame obtained by the k-1th fusion process, so that as the number of iterations increases, the participation ratio of the reference image frame in each fusion process decreases successively, and therefore, the influence of the image quality of the reference image frame on the image quality of the image frame obtained by each fusion process is also gradually reduced, so that, in the case where the image quality of the reference image frame is poor, the adverse influence of the reference image frame on the image quality of the target image frame finally obtained can be effectively reduced, thereby improving the image quality of the target image frame.
[0033] It should be noted that the image processing method provided in the embodiment of the present application may be executed by an image processing device, which may be implemented as part or all of an electronic device through software, hardware, or a combination of software and hardware.
[0034] In the following method embodiments, the execution subject is an electronic device as an example for explanation, wherein the electronic device can be a smart phone, a laptop computer, a tablet computer, a smart watch, a smart bracelet, a smart glasses, a camera, a monitoring device and other electronic devices, and there is no specific restriction on the type of electronic device.
[0035] Please refer to Figure 1 , which shows a flow chart of an image processing method provided by an embodiment of the present application. Figure 1 As shown, the image processing method may include the following steps:
[0036] Step 101: The electronic device determines a reference image frame and n non-reference image frames from a plurality of image frames to be processed.
[0037] In the embodiment of the present application, the image frame to be processed may be an RGB image, a YUV image, a grayscale image, etc. The multiple image frames to be processed may be multiple image frames obtained by the electronic device continuously shooting the target object. Taking the electronic device as a terminal as an example, the terminal may use the front shooting component or the rear shooting component of the terminal to continuously shoot the target object to obtain multiple image frames; of course, the multiple image frames to be processed may also be multiple image frames obtained by other shooting devices continuously shooting the target object, and the other shooting devices send the multiple image frames to the electronic device.
[0038] The target object may be any shooting target, such as a person, an animal, a building, a plant, an environment, etc. Continuous shooting may mean that the shooting time of each image frame to be processed does not overlap or partially overlaps in time sequence, and the shooting time interval between two adjacent image frames to be processed in time sequence is less than a preset time interval threshold, which may be set at the time of implementation, for example, 0.1 second, 0.05 second, etc.
[0039] The number of the plurality of image frames to be processed may be n+1, where n is a positive integer greater than 1, for example, n is 9 or 8, etc. The electronic device determines a reference image frame and n non-reference image frames from the n+1 image frames to be processed.
[0040] Optionally, the electronic device may use the image frame with the highest clarity among the n+1 image frames to be processed as a reference image frame, and the remaining image frames as non-reference image frames; optionally, the electronic device may randomly select an image frame from the n+1 image frames to be processed as a reference image frame, and the remaining image frames as non-reference image frames.
[0041] Step 102: The electronic device performs iterative fusion processing on the reference image frame based on n non-reference image frames to obtain a target image frame.
[0042] The kth fusion process in the iterative fusion process includes: the electronic device fuses the intermediate image frame with the kth non-reference image frame among the n non-reference image frames. k is a positive integer greater than or equal to 1 and less than or equal to n. When k=1, the intermediate image frame is the reference image frame. When k>1, the intermediate image frame is the image frame obtained by the k-1th fusion process.
[0043] Exemplarily, the electronic device performs weighted summation of pixel values at the same pixel position in the intermediate image frame and the kth non-reference image frame to achieve fusion processing of the intermediate image frame and the kth non-reference image frame to obtain an image frame obtained by the kth fusion processing.
[0044] As an implementation mode, before the electronic device performs weighted summation on the pixel values at the same pixel position in the intermediate image frame and the kth non-reference image frame, the electronic device may also align the intermediate image frame and the kth non-reference image frame. Then, the electronic device performs weighted summation on the pixel values at the same pixel position in the intermediate image frame and the kth non-reference image frame. By aligning the intermediate image frame and the kth non-reference image frame to correspond to the same spatial position, the image fusion effect can be improved.
[0045] In the following, taking n equal to 9 as an example, a process in which an electronic device performs iterative fusion processing on a reference image frame based on n non-reference image frames is briefly introduced.
[0046] During the first fusion process, the electronic device fuses the reference image frame and the first non-reference image frame among the nine non-reference image frames to obtain an image frame output by the first fusion process, wherein the first non-reference image frame may be any non-reference image frame among the nine non-reference image frames.
[0047] In the second fusion process, the electronic device uses the image frame output by the first fusion process as an intermediate image (equivalent to the reference frame in the second fusion process), and fuses the intermediate image with the second non-reference image frame to obtain the image frame output by the second fusion process. The second non-reference image frame may be any non-reference image frame among the nine non-reference image frames except the first non-reference image frame.
[0048] By analogy, in the 9th fusion processing, the electronic device uses the image frame output by the 8th fusion processing as the intermediate image, and fuses the intermediate image and the 9th non-reference image frame to obtain the image frame output by the 9th fusion processing. The image frame output by the 9th fusion processing is the target image frame.
[0049] In this way, through the above implementation, the electronic device implements a process of iteratively fusing the reference image frame based on n non-reference image frames to obtain the target image frame.
[0050] In an embodiment of the present application, the exposure of the reference image frame and each non-reference image frame can be the same. The exposure refers to the intensity and duration of light felt by the photosensitive component of the electronic device when the image is captured. Exemplarily, when the electronic device captures multiple image frames to be processed, the intensity and duration of light felt by the photosensitive component can be controlled to be consistent for each image frame to be processed without overexposure, so as to achieve the same exposure of the reference image frame and each non-reference image frame.
[0051] In this way, the exposure of the reference image frame and each non-reference image frame can avoid the phenomenon of excessive noise in the reference image frame and / or non-reference image frame due to sudden changes in exposure (such as sudden reduction or sudden increase) during the shooting process, which is beneficial to improving the image quality of the reference image frame and / or non-reference image frame, thereby helping to improve the image quality of the target image frame.
[0052] The implementation of the above embodiment is supplemented below with reference to an exemplary application scenario.
[0053] Taking the electronic device as an example, when a user uses the terminal to capture an image of a target object, the user inputs a shooting instruction in the terminal (for example, the user clicks a shooting button on the terminal screen, the user makes a preset gesture, or the user gives a voice instruction to take a photo, etc.), and then the terminal continuously captures the target object in accordance with the instructions of the shooting instruction to obtain multiple image frames to be processed.
[0054] Next, the terminal determines a reference image frame and n non-reference image frames from the multiple image frames to be processed, where n is a positive integer greater than 1, and then the terminal performs iterative fusion processing on the reference image frame based on the n non-reference image frames.
[0055] Specifically, in the first fusion processing process, the terminal fuses the reference image frame and the first non-reference image frame (any non-reference image frame among n non-reference image frames) to obtain the image frame output by the first fusion processing; in the second fusion processing process, the terminal uses the image frame output by the first fusion processing as the intermediate image, and fuses the intermediate image with the second non-reference image frame (any non-reference image frame among the n non-reference image frames except the first non-reference image frame) to obtain the image frame output by the second fusion processing; and so on, in the nth fusion processing process, the terminal uses the image frame output by the n-1th fusion processing as the intermediate image, and fuses the intermediate image with the nth non-reference image frame to obtain the image frame output by the nth fusion processing, that is, the target image frame.
[0056] In this way, the above embodiment determines a reference image frame and n non-reference image frames from multiple image frames to be processed, where n is a positive integer greater than 1, and then iteratively fuses the reference image frame based on the n non-reference image frames to obtain a target image frame, wherein the k-th fusion process in the iterative fusion process includes: fusing the intermediate image frame with the k-th non-reference image frame among the n non-reference image frames, where k is a positive integer greater than or equal to 1 and less than or equal to n, when k=1, the intermediate image frame is the reference image frame, and when k>1, the intermediate image frame is the image frame obtained by the k-1-th fusion process. In the case where the image quality of the reference image frame is poor, on the one hand, the reference image frame in each fusion process is used to obtain the target image frame. From the perspective of participation ratio, as the number of iterations increases, the participation ratio of the reference image frame in each fusion processing decreases gradually. Therefore, the influence of the image quality of the reference image frame on the image quality of the image frame obtained by each fusion processing is also gradually reduced, which can effectively reduce the adverse effect of the reference image frame on the image quality of the final target image frame and improve the image quality of the target image frame. On the other hand, from the perspective of improving the image quality of the reference image frame, by iterating the reference image frame, the image frame output by each fusion processing is used as the reference image frame for the next fusion processing, so that the image quality of the reference image frame is gradually improved, thereby more effectively suppressing image noise and improving the image quality of the target image frame.
[0057] In one embodiment, based on Figure 1 The embodiment shown, see Figure 2 This embodiment relates to a process of how an electronic device fuses an intermediate image frame with the kth non-reference image frame among n non-reference image frames. Figure 2 As shown, the process includes step 201 and step 202:
[0058] Step 201: The electronic device obtains a pixel correction coefficient of a kth non-reference image frame.
[0059] The pixel correction coefficient is used to correct the pixel value of the kth non-reference image frame during the fusion process, and the pixel correction coefficient is negatively correlated with the k value.
[0060] It can be understood that, in the iterative fusion process, as the number of iterations increases, the "contribution" of the non-reference image frame selected in each fusion process to the final target image frame becomes greater, that is, as the number of iterations increases, the image quality of the non-reference image frame selected in each fusion process has a greater impact on the image quality of the target image frame. In this case, if the image quality of the non-reference image frame selected in the fusion process with a large number of iterations is poor, it will have a greater adverse effect on the image quality of the target image frame, resulting in poor image quality of the target image frame.
[0061] Exemplarily, during the last fusion process, the electronic device uses the image frame obtained by the second-to-last fusion process as the intermediate image frame and the last non-reference image frame for fusion processing to obtain a target image frame. If the image quality of the last non-reference image frame is poor, then it will have a great impact on the image quality of the target image frame.
[0062] In the embodiment of the present application, in order to balance the proportions of each image frame during the iterative fusion process and avoid the adverse effects of non-reference image frames with poor image quality on the target image frame when the proportions are unbalanced, a pixel correction coefficient is set to correct the pixel value of the kth non-reference image frame during the fusion process (when K is greater than 1, the pixel correction coefficient is used to attenuate the pixel value of the kth non-reference image frame), and the pixel correction coefficient is negatively correlated with the k value. For example, the pixel correction coefficient can be equal to 1 / K, that is, the pixel correction coefficient is 1 during the first fusion process, the pixel correction coefficient is 1 / 2 during the second fusion process, the pixel correction coefficient is 1 / 3 during the third fusion process, and so on.
[0063] Step 202: The electronic device performs fusion processing on the intermediate image frame and the kth non-reference image frame based on the pixel correction coefficient.
[0064] In a possible implementation of step 202, the electronic device may attenuate each pixel value of the kth non-reference image frame based on the pixel correction coefficient when K is greater than 1, and then fuse the pixel values with the intermediate image frame after attenuation, thereby reducing the influence of the image quality of the kth non-reference image frame on the quality of the image frame obtained by the Kth fusion process.
[0065] In another possible implementation of step 202, see Figure 3 , electronic devices can perform Figure 3 Steps 301, 302 and 303 shown implement the process of step 202:
[0066] Step 301: The electronic device performs frequency domain transformation processing on the intermediate image frame and the kth non-reference image frame respectively to obtain a frequency domain intermediate image and a frequency domain non-reference image.
[0067] The electronic device can perform frequency domain transformation processing on the pixel value of each pixel in the intermediate image frame based on a preset frequency domain transformation algorithm to obtain the frequency value of each pixel, and use the frequency value of each pixel as the frequency domain pixel value of the pixel, thereby obtaining a frequency domain image corresponding to the intermediate image frame, that is, a frequency domain intermediate image; similarly, the electronic device can perform frequency domain transformation processing on the kth non-reference image frame based on a preset frequency domain transformation algorithm to obtain a frequency domain non-reference image corresponding to the kth non-reference image frame.
[0068] The frequency domain transformation algorithm may be a DCT (Discrete Cosine Transform) transformation algorithm, a wavelet transformation algorithm, or the like.
[0069] In step 302, the electronic device fuses the frequency domain intermediate image and the frequency domain non-reference image based on the pixel correction coefficient to obtain a frequency domain fused image.
[0070] Exemplarily, the electronic device may attenuate each frequency domain pixel value of the frequency domain non-reference image based on the pixel correction coefficient, and then fuse the attenuated image with the frequency domain intermediate image to obtain a frequency domain fused image.
[0071] Step 303: the electronic device performs inverse frequency domain transformation processing on the frequency domain fused image to obtain an image frame obtained by the kth fusion processing.
[0072] If the electronic device uses the DCT algorithm to perform frequency domain transform processing on the intermediate image frame and the k-th non-reference image frame, the electronic device uses the DCT inverse transform algorithm to perform inverse frequency domain transform processing on the frequency domain fused image, that is, converting the frequency domain fused image to the spatial domain to obtain the image frame obtained by the k-th fusion processing.
[0073] The above-mentioned embodiment uses the pixel correction coefficient to correct the pixel value of the kth non-reference image frame during the fusion process, so that the proportions of each image frame in the iterative fusion process can be balanced, avoiding the adverse effects of non-reference image frames with poor image quality on the target image frame when the proportions are unbalanced, thereby improving the image quality of the target image frame.
[0074] In one embodiment, based on Figure 3 The embodiment shown, see Figure 4 This embodiment relates to how an electronic device fuses a frequency domain intermediate image and a frequency domain non-reference image based on a pixel correction coefficient to obtain a frequency domain fused image. Figure 4 As shown, step 302 may include step 401 and step 402:
[0075] Step 401: The electronic device corrects each frequency domain pixel value in the frequency domain non-reference image based on the pixel correction coefficient to obtain a frequency domain corrected image.
[0076] Each frequency domain pixel value in the frequency domain corrected image is obtained by the electronic device correcting each frequency domain pixel value in the frequency domain non-reference image using a pixel correction coefficient. Exemplarily, the electronic device may multiply the pixel correction coefficient and each frequency domain pixel value in the frequency domain non-reference image respectively, and the frequency domain image obtained after the multiplication is the frequency domain corrected image.
[0077] In step 402, the electronic device performs weighted sum processing on the frequency domain pixel values located at the same pixel position in the frequency domain intermediate image and the frequency domain corrected image to obtain a frequency domain fused image.
[0078] The electronic device performs weighted summation processing on the frequency domain pixel values located at the same pixel position in the frequency domain intermediate image and the frequency domain corrected image, that is, for each identical pixel position, the electronic device performs weighted summation on the frequency domain pixel value corresponding to the pixel position in the frequency domain intermediate image and the frequency domain pixel value corresponding to the pixel position in the frequency domain corrected image to obtain the weighted summed frequency domain pixel value corresponding to the pixel position, and the weighted summed frequency domain pixel values corresponding to each pixel position constitute a frequency domain fused image.
[0079] In one possible implementation, based on Figure 4 The embodiment shown, see Figure 5 In another possible implementation manner of step 302, step 4031, step 4032 and step 4033 may be included before step 402:
[0080] Step 4031: The electronic device determines a noise estimation value corresponding to each pixel position according to the frequency domain intermediate image and the frequency domain non-reference image.
[0081] The electronic device can call the noise estimation program interface, input the frequency domain intermediate image and the frequency domain non-reference image into the noise estimation program interface, and obtain the noise estimation value corresponding to each pixel position returned by the noise estimation program interface.
[0082] Exemplarily, the noise estimation value corresponding to a pixel position may represent the noise level that may be generated during the imaging process at the pixel position.
[0083] Step 4032: The electronic device determines, for each pixel position, an absolute value of a difference between frequency domain pixel values of the frequency domain intermediate image and the frequency domain non-reference image at the pixel position.
[0084] For each pixel position, the electronic device determines the frequency domain pixel value of the pixel position in the frequency domain intermediate image and the frequency domain pixel value in the frequency domain non-reference image, and then, the electronic device calculates the absolute value of the difference between the frequency domain pixel value in the frequency domain intermediate image and the frequency domain pixel value in the frequency domain non-reference image.
[0085] It can be understood that the larger the absolute value of the difference is, the greater the difference between the intermediate image in the frequency domain and the non-reference image in the frequency domain at the pixel position; the smaller the absolute value of the difference is, the smaller the difference between the intermediate image in the frequency domain and the non-reference image in the frequency domain at the pixel position.
[0086] In step 4033, the electronic device determines a first fusion weight of a first pixel point corresponding to the pixel position in the frequency domain intermediate image and a second fusion weight of a second pixel point corresponding to the pixel position in the frequency domain corrected image based on the absolute value of the difference and the noise estimation value corresponding to the pixel position.
[0087] Exemplarily, the electronic device may sum the absolute value of the difference and the noise estimate to obtain a sum, and then divide the absolute value of the difference by the sum to obtain a first fusion weight of a first pixel point corresponding to the pixel position in the frequency domain intermediate image; the electronic device subtracts the first fusion weight from 1 to obtain a second fusion weight of a second pixel point corresponding to the pixel position in a frequency domain corrected image (the frequency domain corrected image is obtained by the electronic device correcting each frequency domain pixel value in the frequency domain non-reference image based on a pixel correction coefficient).
[0088] That is, for the frequency domain corrected image, the greater the difference between the frequency domain intermediate image and the frequency domain non-reference image at a certain pixel position, the smaller the second fusion weight of the second pixel point corresponding to the pixel position, and the less credible the frequency domain pixel value of the second pixel point, thereby reducing the adverse effect of the unreliable second pixel point on the quality of the frequency domain fused image.
[0089] Please continue to see Figure 5 , step 402 may include Figure 4 Step 4021, step 4022 and step 4023 shown:
[0090] In step 4021, for each pixel position, the electronic device multiplies the frequency domain pixel value of the first pixel point corresponding to the pixel position by the first fusion weight to obtain a first product, multiplies the frequency domain pixel value of the second pixel point corresponding to the pixel position by the second fusion weight to obtain a second product, and adds the first product and the second product to obtain a first sum.
[0091] Exemplarily, the first sum can be expressed by w0·ref+w1·λ·other, wherein ref represents the frequency domain pixel value of the first pixel, w0 represents the first fusion weight, λ represents the pixel correction coefficient, other represents the frequency domain pixel value of the pixel corresponding to the pixel position in the frequency domain non-reference image, λ·other represents the frequency domain pixel value of the second pixel, and w1 represents the second fusion weight.
[0092] In step 4022, the electronic device multiplies the second fusion weight and the pixel correction coefficient to obtain a third product, and adds the third product and the first fusion weight to obtain a second sum.
[0093] Exemplarily, the second sum may be expressed as w0+λ·w1, where the meanings of w0, λ, and w1 are as described above and will not be repeated here.
[0094] In step 4023, the electronic device divides the first sum value by the second sum value to obtain a fused pixel value corresponding to the pixel position, and obtains a frequency domain fused image according to the fused pixel value corresponding to each pixel position.
[0095] In this way, the calculation formula of the fused pixel value x corresponding to the pixel position is as shown in Formula 1:
[0096]
[0097] The meanings of the parameters in Formula 1 are as mentioned above and will not be repeated here.
[0098] The above embodiment determines the noise estimation value corresponding to each pixel position based on the frequency domain intermediate image and the frequency domain non-reference image. For each pixel position, the absolute value of the difference between the frequency domain pixel values of the frequency domain intermediate image and the frequency domain non-reference image at the pixel position is determined. Then, based on the absolute value of the difference corresponding to the pixel position and the noise estimation value, a first fusion weight of the first pixel point corresponding to the pixel position in the frequency domain intermediate image and a second fusion weight of the second pixel point corresponding to the pixel position in the frequency domain corrected image are determined. When the difference between the frequency domain intermediate image and the frequency domain non-reference image at a certain pixel position is large, the second fusion weight is correspondingly smaller. In this way, the adverse effect of the unreliable second pixel point in the frequency domain corrected image on the quality of the frequency domain fused image can be reduced, thereby improving the image quality of the target image frame.
[0099] In one embodiment, based on Figure 1 The embodiment shown, see Figure 6 This embodiment relates to a process in which an electronic device performs fusion processing based on image block matching. Figure 6 As shown, before the electronic device fuses the intermediate image frame with the kth non-reference image frame among the n non-reference image frames, it further performs step 601 and step 602:
[0100] Step 601: The electronic device performs block processing on the intermediate image frame to obtain a plurality of intermediate image blocks.
[0101] Step 602: The electronic device determines, for each intermediate image block, a non-reference image block matching the intermediate image block in the kth non-reference image frame.
[0102] The electronic device uses an image blocking algorithm to divide an intermediate image frame into a plurality of intermediate image blocks and divides the kth non-reference image frame into a plurality of non-reference image blocks. Then, for each intermediate image block, the electronic device searches for a non-reference image block that matches the intermediate image block in the plurality of divided non-reference image blocks, wherein the non-reference image block that matches the intermediate image block may be a non-reference image block having features similar to those of the intermediate image block.
[0103] As an implementation method, the electronic device may extract feature data of the intermediate image block, and then search for a non-reference image block having features identical or close to the feature data among multiple non-reference image blocks, thereby obtaining a non-reference image block matching the intermediate image block.
[0104] Exemplarily, after the electronic device determines the non-reference image block that matches the intermediate image block in the kth non-reference image frame, it can also align the intermediate image block and the non-reference image block, and then perform fusion processing on the intermediate image block and the non-reference image block corresponding to the intermediate image block after the alignment.
[0105] Please continue to see Figure 6 , the electronic device may perform steps 603 and 604 to implement a process of fusing the intermediate image frame with the kth non-reference image frame among the n non-reference image frames:
[0106] Step 603: The electronic device performs a fusion process on the intermediate image block and the non-reference image block corresponding to the intermediate image block to obtain an image block fusion process result.
[0107] The process in which the electronic device fuses the intermediate image block and the non-reference image block corresponding to the intermediate image block to obtain the image block fusion processing result can refer to the process in which the electronic device fuses the intermediate image frame and the kth non-reference image frame among n non-reference image frames in the above-mentioned embodiment. For example, the electronic device can first perform frequency domain transformation processing on the intermediate image block and the non-reference image block, and then perform image block fusion processing based on the frequency domain transformation processing result, and so on, which will not be repeated here.
[0108] Step 604: The electronic device obtains an image frame obtained by the k-th fusion processing according to the image block fusion processing results corresponding to each intermediate image block.
[0109] The electronic device performs fusion processing on each intermediate image block and the corresponding non-reference image block respectively, and after obtaining the image block fusion processing results corresponding to each intermediate image block, the electronic device performs image block splicing and other processing on the image block fusion processing results corresponding to each intermediate image block to obtain an image frame obtained by the kth fusion processing.
[0110] It should be noted that in the traditional multi-frame image algorithm, the reference frame is fixed, and each non-reference frame is registered and fused with the reference frame as a fixed reference. Taking the registration and fusion process of a non-reference frame as an example, the reference frame and the non-reference frame are first divided into blocks, and then similar reference frame blocks and non-reference frame blocks are found. However, in the case of poor reference frame quality (for example, the reference frame has dark areas or flat areas, the dark areas and flat areas have insufficient imaging quality and large noise), for a reference frame block, when searching for similar non-reference frame blocks, if the reference frame block includes a dark area or a flat area, the extracted reference frame block features may be noise features. In this way, since it is impossible to obtain effective image features, the noise features are mistakenly used to search for similar non-reference frame blocks, resulting in the non-reference frame blocks found by registration having similar noise to the reference frame blocks. The non-reference frame blocks and the reference frame blocks are then fused, and an effective noise reduction effect cannot be obtained.
[0111] Similarly, for the registration and fusion process of each non-reference frame, since the reference frame is fixed, the non-reference frame blocks found in each registration have similar noise to the reference frame blocks, and thus no effective noise reduction effect can be obtained. That is, for dark light scenes, there are more noise points in the dark or flat areas of the image, which affects the output results of the multi-frame image algorithm.
[0112] In the embodiment of the present application, by iterating the reference image frame, the image frame output from each fusion process is used as the intermediate image frame for the next fusion process (equivalent to the reference image frame for the next fusion process), so that the image quality of the reference image frame is gradually improved. In this way, the quality of the multiple intermediate image blocks obtained by dividing the intermediate image frame into blocks is also improved, which is conducive to obtaining rich image features of the intermediate image blocks, thereby avoiding the problem of failing to obtain effective noise reduction effects due to the mistaken use of noise features to search for similar non-reference frame blocks due to failure to obtain effective image features. The block matching process in the embodiment of the present application is no longer limited to the fixed noise form on the reference frame, and has better noise suppression effects on flat areas and dark areas, thereby improving the image quality of the target image frame.
[0113] For example, see Figure 7 and Figure 8 , Figure 7 and Figure 8 They are schematic diagrams of exemplary image processing effects.
[0114] in, Figure 7 Figure 701 in FIG. 701 is an output image obtained by a traditional multi-frame image algorithm through a fixed reference frame. Figure 7 Figure 702 is a target image frame obtained by using the image processing method of the embodiment of the present application; Figure 8 Figure 801 in FIG. 8 is an output image obtained by a traditional multi-frame image algorithm through a fixed reference frame. Figure 8Figure 802 in FIG. 8 is a target image frame obtained by using the image processing method of the embodiment of the present application. Figure 7 and Figure 8 It can also be seen intuitively that the embodiments of the present application can effectively reduce the noise of the output image, improve the image quality of the target image frame, and have a better noise suppression effect on flat areas and dark areas.
[0115] In one embodiment, based on Figure 1 The embodiment shown, see Fig. 9 This embodiment relates to a process in which an electronic device performs fusion processing by color channel. Fig. 9 As shown, before the electronic device performs fusion processing on the intermediate image frame and the kth non-reference image frame among the n non-reference image frames, step 901 is further performed:
[0116] In step 901, the electronic device performs color channel decomposition on the intermediate image frame to obtain decomposed intermediate images corresponding to each color channel, and performs color channel decomposition on the kth non-reference image frame to obtain decomposed non-reference images corresponding to each channel.
[0117] In the embodiment of the present application, both the intermediate image frame and the non-reference image frame can be YUV images. Compared with RGB images, YUV images have a smaller storage space, which is conducive to saving storage space of electronic devices. Among them, Y represents brightness, also known as grayscale value; U and V represent chroma, which describes color and saturation and is used to specify pixel color.
[0118] Before the iterative fusion processing, the electronic device performs color channel decomposition on the intermediate image frame to obtain a decomposed intermediate image corresponding to the Y color channel, a decomposed intermediate image corresponding to the U color channel, and a decomposed intermediate image corresponding to the V color channel; the electronic device performs color channel decomposition on each non-reference image frame. Taking the k-th non-reference image frame as an example, the electronic device performs color channel decomposition to obtain a decomposed non-reference image corresponding to the Y color channel, a decomposed non-reference image corresponding to the U color channel, and a decomposed non-reference image corresponding to the V color channel of the k-th non-reference image frame.
[0119] Please continue to see Fig. 9 , the electronic device may execute step 902 and step 903 to implement a process of fusing the intermediate image frame with the kth non-reference image frame among the n non-reference image frames:
[0120] Step 902: The electronic device performs fusion processing on the decomposed intermediate image and the decomposed non-reference image corresponding to the decomposed intermediate image for each decomposed intermediate image to obtain a decomposed fused image.
[0121] For the decomposed intermediate image of each color channel, for example, the decomposed intermediate image corresponding to the Y color channel, the electronic device fuses the decomposed intermediate image corresponding to the Y color channel and the decomposed non-reference image corresponding to the Y color channel to obtain the decomposed fused image corresponding to the Y color channel.
[0122] Among them, the process in which the electronic device fuses the decomposed intermediate image corresponding to the Y color channel and the decomposed non-reference image corresponding to the Y color channel to obtain the decomposed fused image corresponding to the Y color channel can refer to the process in which the electronic device fuses the intermediate image frame and the kth non-reference image frame in the above embodiment. For example, the electronic device can first perform frequency domain transformation processing on the decomposed intermediate image corresponding to the Y color channel and the decomposed non-reference image corresponding to the Y color channel, and then perform image block fusion processing based on the frequency domain transformation processing result, and so on, which will not be repeated here.
[0123] Similarly, the electronic device obtains a decomposed fused image corresponding to the U color channel and a decomposed fused image corresponding to the V color channel.
[0124] Step 903: The electronic device obtains an image frame obtained by the k-th fusion process according to the decomposed fused images corresponding to the decomposed intermediate images.
[0125] The electronic device fuses the decomposed fusion image corresponding to the Y color channel, the decomposed fusion image corresponding to the U color channel, and the decomposed fusion image corresponding to the V color channel to obtain an image frame obtained by the k-th fusion process.
[0126] The electronic device in the above embodiment decomposes the intermediate image frame and the kth non-reference image frame into color channels, and then performs fusion processing on each color channel. The electronic device can perform fusion processing on each color channel in parallel, thereby improving image processing efficiency.
[0127] In one embodiment, an image processing method is provided, which may include the following steps:
[0128] In step A1, the electronic device determines a reference image frame and n non-reference image frames from a plurality of image frames to be processed.
[0129] n is a positive integer greater than 1, and the exposure levels of the reference image frame and each non-reference image frame are the same.
[0130] In step A2, the electronic device performs iterative fusion processing on the reference image frame based on the n non-reference image frames to obtain a target image frame.
[0131] The k-th fusion process in the iterative fusion process includes (where k is a positive integer greater than or equal to 1 and less than or equal to n, when k=1, the intermediate image frame is the reference image frame, and when k>1, the intermediate image frame is the image frame obtained by the k-1-th fusion process):
[0132] In step a1, the electronic device obtains a pixel correction coefficient of the kth non-reference image frame.
[0133] The pixel correction coefficient is used to correct the pixel value of the kth non-reference image frame during the fusion process, and the pixel correction coefficient is negatively correlated with the k value.
[0134] In step a2, the electronic device performs frequency domain transformation processing on the intermediate image frame and the kth non-reference image frame respectively to obtain a frequency domain intermediate image and a frequency domain non-reference image.
[0135] In step a3, the electronic device corrects each frequency domain pixel value in the frequency domain non-reference image based on the pixel correction coefficient to obtain a frequency domain corrected image.
[0136] In step a4, the electronic device determines a noise estimation value corresponding to each pixel position according to the intermediate image in the frequency domain and the non-reference image in the frequency domain.
[0137] Step a5: the electronic device determines, for each pixel position, an absolute value of a difference between frequency domain pixel values of the frequency domain intermediate image and the frequency domain non-reference image at the pixel position.
[0138] In step a6, the electronic device determines the first fusion weight of the first pixel point corresponding to the pixel position in the frequency domain intermediate image and the second fusion weight of the second pixel point corresponding to the pixel position in the frequency domain corrected image according to the absolute value of the difference and the noise estimation value corresponding to the pixel position.
[0139] Step a7, for each pixel position, the electronic device multiplies the frequency domain pixel value of the first pixel point corresponding to the pixel position by the first fusion weight to obtain a first product, multiplies the frequency domain pixel value of the second pixel point corresponding to the pixel position by the second fusion weight to obtain a second product, and adds the first product and the second product to obtain a first sum.
[0140] In step a8, the electronic device multiplies the second fusion weight and the pixel correction coefficient to obtain a third product, and adds the third product and the first fusion weight to obtain a second sum.
[0141] In step a9, the electronic device divides the first sum value by the second sum value to obtain a fused pixel value corresponding to the pixel position, and obtains a frequency domain fused image according to the fused pixel value corresponding to each pixel position.
[0142] Step a10, the electronic device performs inverse frequency domain transformation processing on the frequency domain fused image to obtain an image frame obtained by the kth fusion processing.
[0143] Optionally, before step a2, the following steps are further included:
[0144] In step a11, the electronic device performs block processing on the intermediate image frame to obtain a plurality of intermediate image blocks; for each intermediate image block, the electronic device determines a non-reference image block matching the intermediate image block in the kth non-reference image frame.
[0145] Then, the electronic device adopts the method of steps a2 to a10 to fuse the intermediate image block and the non-reference image block matching the intermediate image block to obtain the image block fusion processing result, and then obtains the image frame obtained by the kth fusion processing based on the image block fusion processing results corresponding to each intermediate image block.
[0146] Optionally, before step a2, the following steps are further included:
[0147] In step a12, the electronic device performs color channel decomposition on the intermediate image frame to obtain decomposed intermediate images corresponding to each color channel, and performs color channel decomposition on the kth non-reference image frame to obtain decomposed non-reference images corresponding to each channel.
[0148] Then, the electronic device adopts the method of steps a2 to a10 to fuse the decomposed intermediate image and the decomposed non-reference image corresponding to the decomposed intermediate image to obtain a decomposed fused image, and then obtains the image frame obtained by the kth fusion processing based on the decomposed fused images corresponding to each decomposed intermediate image.
[0149] It should be understood that, although the various steps in the above-mentioned flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above-mentioned flow chart may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0150] Fig.10 FIG. 1 is a structural block diagram of an image processing device according to an embodiment. Fig.10 As shown, the device comprises:
[0151] A determination module 100, configured to determine a reference image frame and n non-reference image frames from a plurality of image frames to be processed, where n is a positive integer greater than 1;
[0152] A processing module 200 is used to perform iterative fusion processing on the reference image frame based on the n non-reference image frames to obtain a target image frame;
[0153] Among them, the processing module 200 is used to fuse the intermediate image frame and the kth non-reference image frame among the n non-reference image frames during the kth fusion processing in the iterative fusion processing, k is a positive integer greater than or equal to 1 and less than or equal to n, when k=1, the intermediate image frame is the reference image frame, and when k>1, the intermediate image frame is the image frame obtained by the k-1th fusion processing.
[0154] Optionally, the processing module 200 includes:
[0155] an acquisition unit, used for acquiring a pixel correction coefficient of the k-th non-reference image frame, wherein the pixel correction coefficient is used for correcting the pixel value of the k-th non-reference image frame during the fusion process, and the pixel correction coefficient is negatively correlated with the k value;
[0156] A fusion processing unit is used to perform fusion processing on the intermediate image frame and the kth non-reference image frame based on the pixel correction coefficient.
[0157] Optionally, the fusion processing unit includes:
[0158] A frequency domain transformation subunit, configured to perform frequency domain transformation processing on the intermediate image frame and the k-th non-reference image frame respectively to obtain a frequency domain intermediate image and a frequency domain non-reference image;
[0159] A fusion processing subunit, configured to perform fusion processing on the frequency domain intermediate image and the frequency domain non-reference image based on the pixel correction coefficient to obtain a frequency domain fused image;
[0160] The inverse frequency domain transformation subunit is used to perform inverse frequency domain transformation processing on the frequency domain fused image to obtain an image frame obtained by the kth fusion processing.
[0161] Optionally, the fusion processing subunit is specifically used to correct each frequency domain pixel value in the frequency domain non-reference image based on the pixel correction coefficient to obtain a frequency domain corrected image; and perform weighted sum processing on the frequency domain pixel values located at the same pixel position in the frequency domain intermediate image and the frequency domain corrected image to obtain the frequency domain fused image.
[0162] Optionally, the fusion processing subunit is further specifically used to determine the noise estimation value corresponding to each pixel position based on the frequency domain intermediate image and the frequency domain non-reference image; for each pixel position, determine the absolute value of the difference between the frequency domain pixel values of the frequency domain intermediate image and the frequency domain non-reference image at the pixel position; and determine the first fusion weight of the first pixel point corresponding to the pixel position in the frequency domain intermediate image and the second fusion weight of the second pixel point corresponding to the pixel position in the frequency domain corrected image based on the absolute value of the difference and the noise estimation value corresponding to the pixel position. Correspondingly, the fusion processing subunit is specifically used to, for each pixel position, multiply the frequency domain pixel value of the first pixel point corresponding to the pixel position by the first fusion weight to obtain a first product, multiply the frequency domain pixel value of the second pixel point corresponding to the pixel position by the second fusion weight to obtain a second product, and add the first product and the second product to obtain a first sum value; multiply the second fusion weight and the pixel correction coefficient to obtain a third product, and add the third product and the first fusion weight to obtain a second sum value; divide the first sum value by the second sum value to obtain the fused pixel value corresponding to the pixel position, and obtain the frequency domain fused image according to the fused pixel values corresponding to each pixel position.
[0163] Optionally, the device further comprises:
[0164] A block division module, used for performing block processing on the intermediate image frame to obtain a plurality of intermediate image blocks;
[0165] a matching module, configured to determine, for each of the intermediate image blocks, a non-reference image block in the kth non-reference image frame that matches the intermediate image block;
[0166] Correspondingly, the processing module 200 is specifically used to fuse the intermediate image block and the non-reference image block corresponding to the intermediate image block to obtain an image block fusion processing result; and according to the image block fusion processing results corresponding to each of the intermediate image blocks, obtain the image frame obtained by the kth fusion processing.
[0167] Optionally, the device further comprises:
[0168] a decomposition module, configured to perform color channel decomposition on the intermediate image frame to obtain decomposed intermediate images corresponding to each color channel, and to perform color channel decomposition on the kth non-reference image frame to obtain decomposed non-reference images corresponding to each channel;
[0169] Correspondingly, the processing module 200 is specifically used to perform a fusion process on the decomposed intermediate image and the decomposed non-reference image corresponding to the decomposed intermediate image for each of the decomposed intermediate images to obtain a decomposed fused image; and obtain an image frame obtained by the kth fusion process according to the decomposed fused image corresponding to each of the decomposed intermediate images.
[0170] Optionally, the reference image frame and each of the non-reference image frames have the same exposure.
[0171] The division of the modules in the above-mentioned image processing device is only for illustration. In other embodiments, the image processing device may be divided into different modules as needed to complete all or part of the functions of the above-mentioned image processing device.
[0172] For the specific definition of the image processing device, please refer to the definition of the image processing method above, which will not be repeated here. Each module in the above-mentioned image processing device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or can be stored in the memory of the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0173] Fig.11 Schematic diagram of the internal structure of an electronic device in an embodiment. The electronic device can be any terminal device such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a car computer, a wearable device, etc. The electronic device includes a processor and a memory connected via a system bus. Among them, the processor may include one or more processing units. The processor may be a CPU (Central Processing Unit) or a DSP (Digital Signal Processing), etc. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by the processor to implement an image processing method provided in each of the above embodiments. The internal memory provides a cache operating environment for the operating system computer program in the non-volatile storage medium.
[0174] The implementation of each module in the image processing device provided in the embodiment of the present application may be in the form of a computer program. The computer program may be run on an electronic device. The program module constituted by the computer program may be stored in a memory of the electronic device. When the computer program is executed by a processor, the steps of the method described in the embodiment of the present application are implemented.
[0175] The embodiment of the present application further provides a computer-readable storage medium, one or more non-volatile computer-readable storage media containing computer-executable instructions, which, when executed by one or more processors, enable the processors to perform the steps of the image processing method.
[0176] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the image processing method.
[0177] Any reference to memory, storage, database or other medium used in this application may include non-volatile and / or volatile memory. Non-volatile memory may include ROM (Read-Only Memory), PROM (Programmable Read-only Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-only Memory) or flash memory. Volatile memory may include RAM (Random Access Memory), which is used as an external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as SRAM (Static Random Access Memory), DRAM (Dynamic Random Access Memory), SDRAM (Synchronous Dynamic Random Access Memory), Double Data Rate DDRSDRAM (Double Data Rate Synchronous Dynamic Random Access memory), ESDRAM (Enhanced Synchronous Dynamic Random Access memory), SLDRAM (Sync Link Dynamic Random Access Memory), RDRAM (Rambus Dynamic Random Access Memory), and DRDRAM (Direct Rambus Dynamic Random Access Memory).
[0178] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. An image processing method, It is characterized in that include: Determining a reference image frame and n non-reference image frames from a plurality of image frames to be processed, where n is a positive integer greater than 1; Performing iterative fusion processing on the reference image frame based on the n non-reference image frames to obtain a target image frame; The k-th fusion process in the iterative fusion process includes: fusing the intermediate image frame with the k-th non-reference image frame among the n non-reference image frames, where k is a positive integer greater than or equal to 1 and less than or equal to n, and when k=1, the intermediate image frame is the reference image frame, and when k>1, the intermediate image frame is the image frame obtained by the k-1-th fusion process; The step of fusing the intermediate image frame with the kth non-reference image frame among the n non-reference image frames includes: Acquire a pixel correction coefficient of the k-th non-reference image frame, wherein the pixel correction coefficient is used to correct the pixel value of the k-th non-reference image frame during the fusion process, and the pixel correction coefficient is negatively correlated with the k value; Based on the pixel correction coefficient, the intermediate image frame and the kth non-reference image frame are fused.
2. The method according to claim 1, It is characterized in that The fusing process of the intermediate image frame and the kth non-reference image frame based on the pixel correction coefficient includes: Performing frequency domain transformation processing on the intermediate image frame and the kth non-reference image frame respectively to obtain a frequency domain intermediate image and a frequency domain non-reference image; Based on the pixel correction coefficient, the frequency domain intermediate image and the frequency domain non-reference image are fused to obtain a frequency domain fused image; The frequency domain fused image is subjected to inverse frequency domain transformation processing to obtain an image frame obtained by the k-th fusion processing.
3. The method according to claim 2, It is characterized in that The step of fusing the frequency domain intermediate image and the frequency domain non-reference image based on the pixel correction coefficient to obtain a frequency domain fused image includes: Based on the pixel correction coefficient, each frequency domain pixel value in the frequency domain non-reference image is corrected to obtain a frequency domain corrected image; The frequency domain pixel values at the same pixel position in the frequency domain intermediate image and the frequency domain corrected image are respectively subjected to weighted summation processing to obtain the frequency domain fused image.
4. The method according to claim 3, It is characterized in that Before performing weighted sum processing on the frequency domain pixel values at the same pixel position in the frequency domain intermediate image and the frequency domain corrected image, the method further includes: Determining a noise estimation value corresponding to each of the pixel positions according to the frequency domain intermediate image and the frequency domain non-reference image; For each of the pixel positions, determining an absolute value of a difference between frequency domain pixel values of the frequency domain intermediate image and the frequency domain non-reference image at the pixel position; According to the absolute value of the difference corresponding to the pixel position and the noise estimation value, a first fusion weight of the first pixel point corresponding to the pixel position in the frequency domain intermediate image and a second fusion weight of the second pixel point corresponding to the pixel position in the frequency domain corrected image are determined.
5. The method according to claim 4, It is characterized in that The step of performing weighted summation processing on the frequency domain pixel values at the same pixel position in the frequency domain intermediate image and the frequency domain corrected image to obtain the frequency domain fused image comprises: For each of the pixel positions, multiply the frequency domain pixel value of the first pixel point corresponding to the pixel position by the first fusion weight to obtain a first product, multiply the frequency domain pixel value of the second pixel point corresponding to the pixel position by the second fusion weight to obtain a second product, and add the first product and the second product to obtain a first sum; multiplying the second fusion weight and the pixel correction coefficient to obtain a third product, and adding the third product and the first fusion weight to obtain a second sum; The first sum value is divided by the second sum value to obtain a fused pixel value corresponding to the pixel position, and the frequency domain fused image is acquired according to the fused pixel value corresponding to each pixel position.
6. The method according to claim 1, It is characterized in that Before fusing the intermediate image frame with the kth non-reference image frame among the n non-reference image frames, the method further includes: Performing block processing on the intermediate image frame to obtain a plurality of intermediate image blocks; For each of the intermediate image blocks, determining a non-reference image block matching the intermediate image block in the kth non-reference image frame; Correspondingly, the fusing process of the intermediate image frame and the kth non-reference image frame among the n non-reference image frames includes: Performing a fusion process on the intermediate image block and the non-reference image block corresponding to the intermediate image block to obtain an image block fusion processing result; According to the image block fusion processing results corresponding to each of the intermediate image blocks, an image frame obtained by the k-th fusion processing is obtained.
7. The method according to claim 1, It is characterized in that Before fusing the intermediate image frame with the kth non-reference image frame among the n non-reference image frames, the method further includes: Decomposing the intermediate image frame by color channel to obtain decomposed intermediate images corresponding to each color channel, and decomposing the kth non-reference image frame by color channel to obtain decomposed non-reference images corresponding to each channel; Correspondingly, the fusing process of the intermediate image frame and the kth non-reference image frame among the n non-reference image frames includes: For each of the decomposed intermediate images, fusing the decomposed intermediate image with the decomposed non-reference image corresponding to the decomposed intermediate image to obtain a decomposed fused image; According to the decomposed fused images corresponding to the decomposed intermediate images, an image frame obtained by the k-th fusion process is obtained.
8. The method according to claim 1, It is characterized in that The reference image frame and each of the non-reference image frames have the same exposure level.
9. An image processing device, It is characterized in that include: A determination module, used to determine a reference image frame and n non-reference image frames from a plurality of image frames to be processed, where n is a positive integer greater than 1; A processing module, configured to perform iterative fusion processing on the reference image frame based on the n non-reference image frames to obtain a target image frame; The k-th fusion process in the iterative fusion process includes: fusing the intermediate image frame with the k-th non-reference image frame among the n non-reference image frames, where k is a positive integer greater than or equal to 1 and less than or equal to n, and when k=1, the intermediate image frame is the reference image frame, and when k>1, the intermediate image frame is the image frame obtained by the k-1-th fusion process; The processing module is specifically used to obtain a pixel correction coefficient of the k-th non-reference image frame, the pixel correction coefficient is used to correct the pixel value of the k-th non-reference image frame during the fusion processing, and the pixel correction coefficient is negatively correlated with the k value; Based on the pixel correction coefficient, the intermediate image frame and the kth non-reference image frame are fused.
10. An electronic device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the computer program is executed by the processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
