Image processing method, device, electronic device and computer readable storage medium
By performing image block splitting and entropy determination on the original image, the corresponding image processing algorithm is used for super-resolution reconstruction, which solves the problems of poor image quality and high equipment performance requirements in super-resolution processing, and achieves high efficiency, Stable image processing.
Patent Information
- Application Number
- CN202210738484.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-27
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2042-06-27
AI Technical Summary
During the super-resolution processing process, when the image content is complex, the picture blur, serration, mosaic and other problems are prone to occur, and the equipment performance requirements are high, which makes it difficult to guarantee speed and stability, and high power consumption, which may lead to terminal lag.
By acquiring the original image and splitting it into multiple image blocks, its image entropy is determined based on the grayscale value distribution of each image block, and super-resolution reconstruction is performed using the corresponding image processing algorithm, and the target image blocks are merged to obtain the final target image.
While ensuring the super-resolution effect, this method reduces the overall computing volume, reduces power consumption, improves processing speed and stability, and avoids terminal lag.
Smart Images

Figure CN115034967B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an image processing method, device, electronic equipment and computer-readable storage medium. Background Art
[0002] As the quality of terminal screens improves, users' requirements for the quality of video, picture and other image resources are becoming higher and higher. However, the clarity, resolution and other parameters of image resources are limited by factors such as acquisition, transmission, storage and processing, resulting in uneven quality of image resources. Low-quality image resources can be processed by super-resolution, image enhancement and other methods to improve image quality.
[0003] Super-resolution is a method of enlarging image resolution to improve image quality. It can process low-quality image resources to improve quality. Currently, it can be implemented using a variety of different algorithms. However, in the process of super-resolution, when the image content is complex, the image super-resolution may cause problems such as blurring, jagged edges, mosaics, etc., and the effect is poor. Alternatively, in order to ensure the overall improvement of the image, complex calculations are required, which places high demands on the performance of the device, making it difficult to ensure the speed and stability of super-resolution, and the power consumption is high, and it may even cause the terminal to freeze. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide an image processing method, device, electronic device and computer-readable storage medium to improve image quality while reducing power consumption and reducing terminal freezes. The specific technical solution is as follows:
[0005] In a first aspect of the present invention, an image processing method is provided, which may include:
[0006] Get the original image;
[0007] Splitting the original image to obtain at least two image blocks;
[0008] For any of the image blocks, obtaining a grayscale value distribution of the image block, and determining an image entropy corresponding to the image block according to the grayscale value distribution of the image block;
[0009] For any of the image blocks, super-resolution reconstruction is performed on the image block using an image processing algorithm corresponding to the image entropy corresponding to the image block to obtain a target image block corresponding to the image block, where different image processing algorithms correspond to image entropies in different intervals;
[0010] The target image blocks corresponding to all the image blocks are merged to obtain a first target image.
[0011] In a second aspect of the present invention, an image processing device is provided, which may include:
[0012] An image acquisition module, used for acquiring original images;
[0013] An image splitting module, used for splitting the original image to obtain at least two image blocks;
[0014] A parameter acquisition module, used for acquiring, for any of the image blocks, a grayscale value distribution corresponding to the image block, and determining an image entropy corresponding to the image block according to the grayscale value distribution of the image block;
[0015] A super-resolution module is used to perform super-resolution reconstruction on any of the image blocks by using an image processing algorithm corresponding to the image entropy corresponding to the image block to obtain a target image block corresponding to the image block, wherein different image processing algorithms correspond to image entropies in different intervals;
[0016] The image merging module is used to merge the target image blocks corresponding to all the image blocks to obtain a first target image.
[0017] In a third aspect of the present invention, an electronic device is provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0018] Memory, used to store computer programs;
[0019] The processor is used to implement the method steps described in the first aspect when executing the program stored in the memory.
[0020] In a fourth aspect of the implementation of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the image processing method described in the first aspect above.
[0021] In a fifth aspect of the implementation of the present invention, there is also provided a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the image processing method described in the first aspect above.
[0022] The image processing method provided by the present invention, after obtaining the original image, splits the original image to obtain at least two image blocks, then obtains the gray value distribution of each image block, and determines the image entropy corresponding to the image block according to the gray value distribution. Since the image entropy is a parameter that characterizes the average amount of information in the image, at this time, different image processing algorithms can be corresponding to image entropies of different intervals, so that the image blocks are super-resolved using the image processing algorithms corresponding to the image entropies to obtain target image blocks, and then the target image blocks are merged into the first target image. In the present invention, since different image processing algorithms correspond to image entropies of different intervals, image blocks with different amounts of information can be processed in a branching manner using corresponding image processing algorithms, while ensuring the super-resolution effect of the image blocks, the overall amount of calculation is reduced, which not only ensures the speed and stability of the super-resolution, but also reduces power consumption and avoids jamming. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0024] Figure 1 It is one of the step flow charts of the image processing method provided by an embodiment of the present invention;
[0025] Figure 2 This is the second step flow chart of the image processing method provided by the embodiment of the present invention;
[0026] Figure 3 This is the third step flow chart of the image processing method provided by the embodiment of the present invention;
[0027] Figure 4 is a schematic diagram of an interface for obtaining an original image provided by an embodiment of the present invention;
[0028] Figure 5 is an image processing comparison diagram provided by an embodiment of the present invention;
[0029] Figure 6 is a structural block diagram of an image processing device provided by an embodiment of the present invention;
[0030] Figure 7 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0031] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0032] Reference Figure 1 , shows one of the step flow charts of the image processing method provided by an embodiment of the present invention, such as Figure 1As shown, the method may include:
[0033] Step 101: Obtain an original image.
[0034] In the embodiment of the present invention, the original image may include a picture or video frame that needs to be reconstructed with super resolution, wherein the resolution of the image resource such as the picture or video can be detected, and when the resolution is lower than a certain threshold, the image or video frame of the video can be determined as the original image, or user input of the picture or video can be received, and when the user input indicates to reconstruct the picture or video with super resolution, the picture or video frame of the video can be determined as the original image, and the embodiment of the present invention does not specifically limit the method of obtaining the original image. Among them, super-resolution reconstruction can also be referred to as super-resolution.
[0035] Step 102: split the original image to obtain at least two image blocks.
[0036] In an embodiment of the present invention, the original image can be split according to parameters such as size, grayscale, color, spatial texture, geometric shape, etc. to obtain different image blocks. For example, the image can be split based on grayscale threshold, based on region growing, region splitting and merging, based on edge detection, or based on deep learning. The sizes and shapes of different image blocks can be the same or different. In the embodiment of the present invention, there is no specific limitation on the method of splitting the original image.
[0037] Step 103: For any of the image blocks, obtain the grayscale value distribution of the image block, and determine the image entropy corresponding to the image block according to the grayscale value distribution of the image block.
[0038] In the embodiment of the present invention, the gray value is a parameter representing the brightness of a pixel in an image, wherein white is 255 and black is 0. The gray value can take values between 0 and 255 according to the brightness change. The gray value distribution can be determined according to the number and position of pixels corresponding to different gray values in the image. The image entropy represents the amount of information contained in the aggregation features of the gray distribution in the image. It is a statistical form of image features and can reflect the average amount of information in the image. Generally, the larger the image entropy, the more information, the more complex the image, and the more textures the image contains. The smaller the image entropy, the less information, the simpler the image, and the more flat areas the image contains. On this basis, the image entropy of the image block can be determined based on the gray value distribution.
[0039] Step 104: for any of the image blocks, super-resolution reconstruction is performed on the image block using an image processing algorithm corresponding to the image entropy corresponding to the image block to obtain a target image block corresponding to the image block, wherein different image processing algorithms correspond to image entropies in different ranges.
[0040] In the embodiment of the present invention, in order to achieve the expected effect, the larger the image entropy, the more image information and the higher the calculation requirement, and the smaller the image entropy, the less image information and the lower the calculation requirement, therefore, different image processing algorithms can correspond to image entropy in different ranges. For example, when the image entropy is large, a complex image processing algorithm can be selected, which has a large amount of calculation and a good processing effect. When the image entropy is small, a simple image processing algorithm can be selected, which has a small amount of calculation and saves power consumption while ensuring the processing effect. On this basis, each image block is subjected to super-resolution processing according to the image entropy to obtain a target image block. While ensuring the overall super-resolution effect, the overall amount of calculation is reduced, the power consumption is reduced, and the speed and stability of the super-resolution are ensured.
[0041] Specifically, for at least two of the above image blocks, the corresponding image processing algorithm used may be at least one, and at the same time, for at least two of the above image blocks, when the corresponding image processing algorithm is used for super-resolution reconstruction, a parallel processing method may be adopted to further improve the processing efficiency. Of course, a serial processing method may also be adopted, and the embodiment of the present invention does not limit this.
[0042] Step 105: Merge the target image blocks corresponding to all the image blocks to obtain a first target image.
[0043] In the embodiment of the present invention, after each image block is super-resolution reconstructed to obtain each target image block, all target image blocks are merged to obtain a first target image, and different target image blocks after super-resolution are spliced into a complete first target image.
[0044] The image processing method provided by the embodiment of the present invention, after obtaining the original image, splits the original image to obtain at least two image blocks, then obtains the gray value distribution of each image block, and determines the image entropy corresponding to the image block according to the gray value distribution. Since the image entropy is a parameter that characterizes the average amount of information in the image, at this time, different image processing algorithms can be matched to image entropies of different intervals, so that the image processing algorithm corresponding to the image entropy is used to perform super-resolution on the image block to obtain the target image block, and then the target image block is merged into the first target image. In the embodiment of the present invention, since different image processing algorithms correspond to image entropies of different intervals, the corresponding image processing algorithms can be used for branching processing for image blocks with different amounts of information. Therefore, the branching processing of the original image reduces the overall amount of calculation while ensuring the super-resolution effect of the image block, which not only ensures the speed and stability of the super-resolution, but also reduces power consumption and avoids jamming.
[0045] Reference Figure 2 , shows a second flow chart of the steps of the image processing method provided by an embodiment of the present invention, such as Figure 2 As shown, the method may include:
[0046] Step 201: Obtain an original image.
[0047] In the embodiment of the present invention, step 201 may correspond to the relevant description of the aforementioned step 101, and will not be described again here to avoid repetition.
[0048] like Figure 2 As shown, in step 201, an original image I is obtained.
[0049] Step 202: split the original image to obtain at least two image blocks.
[0050] In the embodiment of the present invention, step 202 may correspond to the relevant description of the aforementioned step 102, and will not be described again here to avoid repetition.
[0051] For example, the original image I is split to obtain an image block B of 32×32 pixels. i , where i represents the i-th image block.
[0052] Step 203: Obtain the grayscale value corresponding to each pixel in the image block.
[0053] In the embodiment of the present invention, a pixel may be an indivisible smallest square in an image block, and each pixel corresponds to a position coordinate and a color value. The color value may be represented by an RGB (red, green, blue) color standard, which means that the color of the pixel is obtained by mixing red, green, and blue at a specified brightness, and the brightness of the red, green, and blue colors may be respectively within a range of 0-255; when the specified brightness of red, green, and blue are the same, they are displayed as gray tones, so that gray values corresponding to different brightnesses may be converted to obtain gray values by using the color values corresponding to the pixels, so that each pixel in the image block is converted to a black display of a corresponding saturation with black as the reference color, and the image block is grayed. Optionally, different gray conversion algorithms may be used to convert the color value into a gray value, such as averaging the specified brightness of red, green, and blue, or weighted calculation of the specified brightness of red, green, and blue based on the sensitivity of the human eye to color perception (green>red>blue), or taking the maximum value and the minimum value among the specified brightness of red, green, and blue. In the embodiment of the present invention, there is no specific limitation on the method for obtaining the gray value.
[0054] Step 204: Obtain the occurrence probability of each pixel corresponding to the grayscale value in the image block.
[0055] In an embodiment of the present invention, the occurrence probability can be used to reflect the possibility of a pixel of the grayscale value appearing in an image block, and to characterize the grayscale distribution of the image block, wherein the occurrence probability of the pixel of the grayscale value in the image block can be represented by the ratio of the number of pixels corresponding to the grayscale value to the total number of pixels in the image block. At this time, the occurrence probability of a pixel can represent the probability that the grayscale value of any pixel in the image block is the grayscale value of the pixel.
[0056] Step 205: Determine the amount of information when a pixel corresponding to each grayscale value appears according to the occurrence probability.
[0057] In the embodiment of the present invention, the amount of information when a pixel corresponding to each gray value appears can be determined based on the occurrence probability. Generally, the higher the occurrence probability of a pixel, the smaller the amount of information, and the smaller the occurrence probability of a pixel, the larger the amount of information. The probability of simultaneous occurrence of pixels with different gray values is obtained by multiplying the corresponding occurrence probabilities of pixels with different gray values, and the total amount of information when pixels with different gray values appear simultaneously is equal to the sum of the amounts of information when pixels with different gray values appear separately, thereby determining that there is a logarithmic relationship of a decreasing function between the occurrence probability of a pixel and the amount of information, that is, the amount of information when a pixel corresponding to each gray value appears can be determined based on the occurrence probability by the following formula (1):
[0058] I(P j )=-logP j ······················(1)
[0059] Among them, P j Represents the probability of occurrence of a pixel with gray value j, I(P j ) represents the amount of information when a pixel with gray value j appears.
[0060] Step 206: Determine the image entropy corresponding to the image block according to the occurrence probability and the information amount corresponding to each gray value in the image block.
[0061] In the embodiment of the present invention, the occurrence probability of a pixel of each gray value can be multiplied by the amount of information when the pixel of each gray value appears, and the average amount of information corresponding to the pixel of each gray value can be determined. On this basis, the average amount of information corresponding to the pixel of each gray value is added to obtain the image entropy, so that the image entropy can reflect the amount of average information in the image block, that is, the image entropy corresponding to the image block can be determined according to the occurrence probability and information amount corresponding to each gray value in the image block by the following formula (2):
[0062]
[0063] Where H is the image entropy.
[0064] Step 207: When the image entropy corresponding to the image block is within a first interval, a deep learning algorithm is used to perform super-resolution reconstruction on the image block to obtain a target image block corresponding to the image block; or, when the image entropy corresponding to the image block is within a second interval, an interpolation algorithm is used to perform super-resolution reconstruction on the image block to obtain a target image block corresponding to the image block; any value within the first interval is greater than any value within the second interval.
[0065] In the embodiment of the present invention, for image blocks with different information contents, corresponding image processing algorithms can be used for branching processing, such as image blocks with low information contents can be processed by image processing algorithms for processing low information contents images, and image blocks with high information contents can be processed by image processing algorithms for processing high information contents images. Specifically, image blocks can be super-resolutioned by using different image processing algorithms according to the interval range to which the image entropy belongs, wherein the image blocks may include a first interval range and a second interval range, and any image entropy in the first interval range is greater than any image entropy in the second interval range, then the image blocks corresponding to the first interval range contain an average amount of information greater than the image blocks corresponding to the second interval range. At this time, when the image entropy corresponding to the image block is within the first interval range, a complex image processing algorithm such as a deep learning algorithm can be used to perform super-resolution reconstruction on the image block, and when the image entropy corresponding to the image block is within the second interval range, a simple image processing algorithm such as an interpolation algorithm can be used to perform super-resolution reconstruction on the image block, thereby obtaining a target image block after super-resolution. Since image processing algorithms for processing low information contents are usually simple in operation, and image processing algorithms for processing high information contents are usually complex in operation, branching processing of the original image reduces the overall amount of operation while ensuring the super-resolution effect of the image block. Optionally, the deep learning algorithm may include a convolutional neural network, a residual neural network, a recursive neural network, etc., the interpolation algorithm may include nearest neighbor interpolation, linear interpolation, bicubic interpolation, etc., and the super-resolution image processing algorithm may also include a frequency-based algorithm, a reconstruction-based algorithm, etc. The embodiment of the present invention does not impose any specific restrictions on this.
[0066] In an embodiment of the present invention, an image entropy threshold can be set. When the image entropy is greater than the image entropy threshold, the image entropy is determined to be in a first interval range, and a deep learning algorithm is used to perform super-resolution on the image block corresponding to the image entropy; when the image entropy is less than or equal to the image entropy threshold, the image entropy is determined to be in a second interval range, and a difference algorithm is used to perform super-resolution on the image block corresponding to the image entropy, wherein the image entropy threshold can be set according to the grayscale distribution of the original image, the processing performance of the image processing algorithm, the super-resolution effect requirements, etc.
[0067] For example, if the image entropy threshold is set to T, the processing process is as follows:
[0068] if H i >T
[0069] B i Processed using deep learning algorithms
[0070] else
[0071] B i Using interpolation algorithm
[0072] Among them, H i represents the image entropy of the i-th image block.
[0073] Optionally, the method may be applied to an electronic device including a central processing unit and an embedded neural network processor, and step 207 specifically includes:
[0074] The deep learning algorithm is executed by the embedded neural network processor to perform super-resolution reconstruction on the image block; the interpolation algorithm is executed by the central processing unit to perform super-resolution reconstruction on the image block to obtain a target image block.
[0075] In the embodiment of the present invention, it can be applied to a central processing unit (CPU) and an embedded neural network processing unit (NPU), wherein different image processing algorithms can be executed by different processors, such as performing super-resolution reconstruction on image blocks corresponding to the image entropy in the second interval range by executing an interpolation algorithm by the CPU, and performing super-resolution reconstruction on image blocks corresponding to the image entropy in the first interval range by executing a deep learning algorithm by the NPU, wherein the CPU is a core hardware unit for controlling and allocating hardware resources of the electronic device and performing general operations, and the CPU can achieve super-resolution of image blocks with less information while ensuring the stability and smoothness of the CPU by executing a relatively simple interpolation algorithm, and the NPU is a hardware unit that adopts a data-driven parallel computing architecture and is good at processing multimedia data, and the NPU can achieve efficient super-resolution of image blocks with a large amount of information by executing a relatively complex deep learning algorithm, and only part of the image blocks with a large amount of information need to be processed on the NPU, thereby reducing the amount of calculation, thereby reducing the power consumption of image processing through branch processing as a whole, more fully coordinating the resources of each hardware unit in the electronic device, and reducing the jamming phenomenon in the image super-resolution process.
[0076] Step 208: Merge the target image blocks corresponding to all the image blocks to obtain a first target image.
[0077] In the embodiment of the present invention, step 208 may correspond to the relevant description of the aforementioned step 105, and will not be described again here to avoid repetition.
[0078] like Figure 2 As shown, in step 208, a first target image I is obtained. SR .
[0079] The image processing method provided by the embodiment of the present invention, after obtaining the original image, splits the original image to obtain at least two image blocks, then obtains the gray value distribution of each image block, and determines the image entropy corresponding to the image block according to the gray value distribution. Since the image entropy is a parameter that characterizes the average amount of information in the image, at this time, different image processing algorithms can be corresponding to image entropies of different intervals, so that the image blocks are super-resolved using the image processing algorithms corresponding to the image entropy to obtain target image blocks, and then all target image blocks are merged into the first target image. In the embodiment of the present invention, since different image processing algorithms correspond to image entropies of different intervals, image blocks with different amounts of information can be processed by corresponding image processing algorithms in a branching manner, such as image blocks with low amounts of information can be processed by image processing algorithms for processing images with low amounts of information, and image blocks with high amounts of information can be processed by image processing algorithms for processing images with high amounts of information. Since image processing algorithms for processing images with low amounts of information are usually simple in operation, and image processing algorithms for processing images with high amounts of information are usually complex in operation, therefore, the branching of the original image reduces the overall amount of operation while ensuring the super-resolution effect of the image blocks, which not only ensures the speed and stability of the super-resolution, but also reduces power consumption and avoids jamming.
[0080] Reference Figure 3 , shows a third step flow chart of the image processing method provided by an embodiment of the present invention, such as Figure 3 As shown, the method may include:
[0081] Step 301: Obtain an original image.
[0082] Reference Figure 4 , shows a schematic diagram of an interface for obtaining an original image provided by an embodiment of the present invention, such as Figure 4 As shown, during the video playback process, the user's start operation of the "enhance image quality" switch is received, and the video frame of the video resource being played is obtained as the original image.
[0083] Step 302: split the original image to obtain at least two image blocks.
[0084] Step 303: For any of the image blocks, obtain the grayscale value distribution of the image block, and determine the image entropy corresponding to the image block according to the grayscale value distribution of the image block.
[0085] Step 304: for any of the image blocks, super-resolution reconstruction is performed on the image block using an image processing algorithm corresponding to the image entropy corresponding to the image block to obtain a target image block corresponding to the image block, and different image processing algorithms correspond to image entropies in different ranges.
[0086] Step 305: Merge the target image blocks corresponding to all the image blocks to obtain a first target image.
[0087] In the embodiment of the present invention, steps 301 to 305 may correspond to the related descriptions of the aforementioned steps 101 to 105 or the aforementioned steps 201 to 208, and will not be described in detail herein to avoid repetition.
[0088] Step 306: Perform image enhancement processing on the original image to obtain a second target image.
[0089] In an embodiment of the present invention, in addition to super-resolution, image enhancement processing can also be performed on the original image, such as enhancing the image sharpness and color of the original image to achieve image edge preservation, denoising, and detail enhancement, so as to obtain a second target image with improved human eye perception and recognition. Optionally, bilateral filtering can be used for image enhancement processing. Bilateral filtering is a nonlinear filtering method that combines the spatial proximity and grayscale value similarity of the image in a compromise processing, while considering spatial domain information and grayscale similarity to achieve the purpose of edge preservation and denoising. Anisotropic diffusion filtering algorithms, surface blur filtering algorithms, guided filtering algorithms, etc. can also be selected.
[0090] like Figure 3 As shown, the original image I is enhanced to obtain the second target image I Ehance .
[0091] Optionally, the method is applied to an electronic device including a graphics processor, and step 306 specifically includes:
[0092] The second target image is obtained by performing image enhancement processing on the original image through the graphics processor.
[0093] In an embodiment of the present invention, it can be applied to an electronic device including a graphics processing unit (GPU). The structure of the GPU is relatively simple, with a large number of computing units and a long pipeline, and can efficiently perform a large number of repeated operations, especially the operation of repeatedly performing convolution denoising on the image by the filter. On the basis that the electronic device includes a GPU, the GPU can be used to perform image enhancement processing, making full use of the performance characteristics of hardware resources and improving computing efficiency. Among them, when the electronic device includes a CPU, an NPU, and a GPU, the CPU can realize the overall allocation of hardware resources, execute simple image processing algorithms, and split and merge image blocks, etc., the NPU executes complex image processing algorithms, refer to the relevant description of step 207, and the GPU performs enhancement processing on the original image, while distinguishing the processing methods, selecting different hardware units for branch processing.
[0094] Step 307: Obtain a fusion coefficient of the first target image and the second target image at each fusion position, where the fusion coefficient is used to characterize the amount of high-frequency information of the first target image and the second target image at the fusion position.
[0095] In an embodiment of the present invention, super-resolution and image enhancement processing can be processed in parallel, and then the first target image and the second target image are fused, thereby effectively improving the efficiency of image processing. During the fusion process, a corresponding fusion coefficient can be obtained for each fusion position, and the fusion coefficient can characterize the amount of high-frequency information of the first target image and the second target image at the fusion position. The more high-frequency information there is, the larger the fusion coefficient will be, and the less high-frequency information there is, the smaller the fusion coefficient will be. Therefore, during the fusion process, the high-frequency information in the first target image and the second target image can be better retained to avoid loss of details.
[0096] Optionally, the step 307 includes:
[0097] Step S11: extract high-frequency features from the first target image to obtain a first high-frequency image.
[0098] In an embodiment of the present invention, high-frequency features can be further extracted from the first target image after super-resolution to obtain a first high-frequency image, wherein the grayscale image of the first target image can be Gaussian filtered, and the filter kernel used in the Gaussian filter is small for fast calculation to retain the high-frequency information of the first target image.
[0099] For example, the first target image is converted into a grayscale image by the following formula (3):
[0100] Y SR =RGB2Gray(I SR)·················(3)
[0101] Among them, Y SR Represents the first target image I SR Grayscale image of .
[0102] The grayscale image is Gaussian filtered using the following formula (4):
[0103]
[0104] Where x,y represents Y SR , σ is a preset coefficient, which can be set based on experience, for example, it can be taken as 0.5.
[0105] The first high-frequency image is obtained by extracting high-frequency features through the following formula (5):
[0106] C SR =|Y SR -Gauss(Y SR )|···············(5)
[0107] Among them, C SR represents the first high-frequency image.
[0108] Step S12: extracting high-frequency features from the second target image to obtain a second high-frequency image.
[0109] In the embodiment of the present invention, the process of extracting high-frequency features from the second target image to obtain the second high-frequency image in step S12 may correspond to the process of extracting high-frequency features from the first target image to obtain the first high-frequency image in the aforementioned step S11, which will not be described again to avoid repetition.
[0110] For example, the second target image is converted into a grayscale image by the following formula (6):
[0111] Y Ehance =RGB2Gray(I Ehance )···············(6)
[0112] Among them, Y Ehance Represents the second target image I Ehance Grayscale image of .
[0113] The grayscale image is Gaussian filtered using the following formula (4):
[0114]
[0115] Where x,y represents Y EhanceThe position coordinate in is σ, and σ is a preset coefficient, which can be an empirical coefficient, for example, 0.5.
[0116] The first high-frequency image is obtained by extracting high-frequency features through the following formula (8):
[0117] C Ehance =|Y Ehance -Gauss(Y Ehance )|···········(8)
[0118] Among them, C Ehance represents the second high frequency image.
[0119] Step S13: Calculate the product of the coefficients of the fusion position in the first high-frequency image and the second high-frequency image to obtain the fusion coefficient.
[0120] In an embodiment of the present invention, the fusion coefficient can be determined by multiplying the coefficients of the first high-frequency image and the second high-frequency image at the fusion position. In this case, the fusion coefficient can represent the amount of high-frequency information of the first target image and the second target image at the fusion position.
[0121] For example, the fusion coefficient at the fusion position is calculated by the following formula (9):
[0122] W x,y =C SR *C Ehance ··················(9)
[0123] Among them, W x,y Represents the fusion coefficient at the fusion position (x, y).
[0124] Specifically, through the above formulas (3) to (8), the above formula (9) can be specifically expressed as:
[0125]
[0126] Step 308: Use a fusion coefficient to fuse the first target image and the second target image at each fusion position to obtain a target image.
[0127] In the embodiment of the present invention, when the first target image and the second target image are fused, each fusion position is weighted using a corresponding fusion coefficient, so as to better achieve fusion transition based on the amount of information, thereby effectively improving the image fusion effect.
[0128] Furthermore, since high-frequency information contains important information such as image edges and textures, by extracting the high-frequency features of the first target image and the second target image, and obtaining the fusion coefficient based on the high-frequency image obtained based on the high-frequency features, the determined fusion coefficient can be made more reasonable and accurate to a certain extent.
[0129] Optionally, the step 308 includes:
[0130] Step S14: Based on the fusion coefficient of each fusion position, weighted sum of the first target image and the second target image at each fusion position is performed to obtain the target image.
[0131] For example, the first target image and the second target image are weighted summed at each fusion position by the following formula (11) to obtain the fused target image:
[0132] I out =W x,y I SR +(1-W x,y )I Ehance ··········(11)
[0133] For example, taking the above (x, y) as (1, 1), the pixel value of the position (1, 1) in the above first target image and the pixel value of the position (1, 1) in the above second target image can be input into the above formula (11), so as to obtain the pixel value of the position (1, 1) in the target image. Furthermore, through different (x, y), the pixel value at each fusion position in the target image can be obtained in turn, and then the fused target image can be obtained.
[0134] like Figure 3 As shown, for the first target image I SR With the second target image I Ehance Fusion is performed at each fusion position to obtain the target image I out .
[0135] Reference Figure 5 , shows an image processing comparison diagram provided by an embodiment of the present invention, such as Figure 5 As shown, after the original 480p image is processed, the image quality is significantly enhanced.
[0136] The image processing method provided by the embodiment of the present invention, after obtaining the original image, splits the original image to obtain at least two image blocks, then obtains the gray value distribution of each image block, and determines the image entropy corresponding to the image block according to the gray value distribution. Since the image entropy is a parameter that characterizes the average amount of information in the image, at this time, different image processing algorithms can be corresponding to image entropies of different intervals, so that the image blocks are super-resolved using the image processing algorithms corresponding to the image entropies to obtain target image blocks, and then the target image blocks are merged into the first target image. In the embodiment of the present invention, since different image processing algorithms correspond to image entropies of different intervals, image blocks with different amounts of information can be processed by corresponding image processing algorithms in a branching manner, such as image blocks with low amounts of information can be processed by using image processing algorithms for processing images with low amounts of information, and image blocks with high amounts of information can be processed by using image processing algorithms for processing images with high amounts of information. Since image processing algorithms for processing images with low amounts of information are usually simple in operation, and image processing algorithms for processing images with high amounts of information are usually complex in operation, therefore, the branching of the original image reduces the overall amount of operation while ensuring the super-resolution effect of the image blocks, which not only ensures the speed and stability of the super-resolution, but also reduces power consumption and avoids jamming.
[0137] In an embodiment of the present invention, image enhancement processing is further performed on the original image to obtain a second target image, and the first target image and the second target image are fused based on a fusion coefficient at each fusion position, wherein the fusion coefficient is used to characterize the amount of high-frequency information of the first target image and the second target image at the fusion position, so that image fusion based on the fusion coefficient can retain more high-frequency information of the image, reduce detail loss, and effectively improve the effect of image optimization.
[0138] Reference Figure 6 , shows a structural block diagram of an image processing device 40 provided by an embodiment of the present invention, such as Figure 6 As shown, the device may include:
[0139] An image acquisition module 401 is used to acquire an original image;
[0140] An image splitting module 402 is used to split the original image to obtain at least two image blocks;
[0141] The parameter acquisition module 403 is used to acquire, for any of the image blocks, the gray value distribution corresponding to the image block, and determine the image entropy corresponding to the image block according to the gray value distribution of the image block;
[0142] A super-resolution module 404 is used to perform super-resolution reconstruction on any of the image blocks by using an image processing algorithm corresponding to the image entropy corresponding to the image block to obtain a target image block corresponding to the image block, wherein different image processing algorithms correspond to image entropies in different intervals;
[0143] The image merging module 405 is configured to merge the target image blocks corresponding to all the image blocks to obtain a first target image.
[0144] Optionally, the device further comprises:
[0145] An image enhancement module, used for performing image enhancement processing on the original image to obtain a second target image;
[0146] A coefficient acquisition module, used to acquire a fusion coefficient of the first target image and the second target image at each fusion position, wherein the fusion coefficient is used to characterize the amount of high-frequency information of the first target image and the second target image at the fusion position;
[0147] The image fusion module is used to fuse the first target image and the second target image at each fusion position using a fusion coefficient to obtain a target image.
[0148] Optionally, the coefficient acquisition module includes:
[0149] A high-frequency feature extraction submodule, used to extract high-frequency features from the first target image to obtain a first high-frequency image;
[0150] The high-frequency feature extraction submodule is further used to extract high-frequency features from the second target image to obtain a second high-frequency image;
[0151] The fusion coefficient calculation submodule is used to calculate the coefficient product of the fusion position in the first high-frequency image and the second high-frequency image to obtain the fusion coefficient.
[0152] Optionally, the image fusion module is specifically used to:
[0153] Based on the fusion coefficient of each fusion position, a weighted sum is performed on the first target image and the second target image at each fusion position to obtain the target image.
[0154] Optionally, the super-resolution module 404 is specifically used to perform super-resolution reconstruction on the image block using a deep learning algorithm when the image entropy corresponding to the image block is within a first interval, so as to obtain a target image block corresponding to the image block; or, when the image entropy corresponding to the image block is within a second interval, perform super-resolution reconstruction on the image block using an interpolation algorithm to obtain a target image block corresponding to the image block; any value within the first interval is greater than any value within the second interval.
[0155] Optionally, the parameter acquisition module 403 includes:
[0156] A gray value acquisition submodule, used to acquire the gray value corresponding to each pixel in the image block;
[0157] An occurrence probability calculation submodule, used to obtain the occurrence probability of each pixel corresponding to the gray value in the image block;
[0158] An information amount calculation submodule, used to determine the amount of information when a pixel corresponding to each gray value appears according to the occurrence probability;
[0159] The image entropy calculation submodule is used to determine the image entropy corresponding to the image block according to the occurrence probability and the information amount corresponding to each gray value in the image block.
[0160] Optionally, the device is applied to an electronic device including a central processing unit and an embedded neural network processor, and the super-resolution module 404 is specifically used to execute the deep learning algorithm through the embedded neural network processor to perform super-resolution reconstruction on the image block; and execute the interpolation algorithm through the central processing unit to perform super-resolution reconstruction on the image block to obtain a target image block.
[0161] Optionally, the device is applied to an electronic device including a graphics processor, and the image enhancement module is specifically configured to perform image enhancement processing on the original image through the graphics processor to obtain the second target image.
[0162] The image processing device provided by the embodiment of the present invention obtains the original image, splits the original image to obtain at least two image blocks, obtains the gray value distribution of each image block, and determines the image entropy corresponding to the image block according to the gray value distribution. Since the image entropy is a parameter that characterizes the average amount of information in the image, different image processing algorithms can be corresponding to image entropies of different intervals, so that the image blocks are super-resolved using the image processing algorithms corresponding to the image entropy to obtain the target image blocks, and then the target image blocks are merged into the first target image. In the embodiment of the present invention, since different image processing algorithms correspond to image entropies of different intervals, image blocks with different amounts of information can be processed by corresponding image processing algorithms in a branching manner. For example, image blocks with low amounts of information can be processed by using image processing algorithms for processing images with low amounts of information, and image blocks with high amounts of information can be processed by using image processing algorithms for processing images with high amounts of information. Since image processing algorithms for processing images with low amounts of information are usually simple in operation, and image processing algorithms for processing images with high amounts of information are usually complex in operation, the branching of the original image reduces the overall amount of operation while ensuring the super-resolution effect of the image blocks, thereby ensuring the speed and stability of the super-resolution, reducing power consumption, and avoiding jamming.
[0163] In an embodiment of the present invention, image enhancement processing is further performed on the original image to obtain a second target image, and the first target image and the second target image are fused based on a fusion coefficient at each fusion position, wherein the fusion coefficient is used to characterize the amount of high-frequency information of the first target image and the second target image at the fusion position, so that image fusion based on the fusion coefficient can retain more high-frequency information of the image, reduce detail loss, and effectively improve the effect of image optimization.
[0164] The embodiment of the present invention further provides an electronic device, such as Figure 7 As shown, it includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504.
[0165] Memory 503, used for storing computer programs;
[0166] The processor 501 is used to execute the program stored in the memory 503, and implements the following steps:
[0167] Get the original image;
[0168] Splitting the original image to obtain at least two image blocks;
[0169] For any of the image blocks, obtaining a grayscale value distribution of the image block, and determining an image entropy corresponding to the image block according to the grayscale value distribution of the image block;
[0170] For any of the image blocks, super-resolution reconstruction is performed on the image block using an image processing algorithm corresponding to the image entropy corresponding to the image block to obtain a target image block corresponding to the image block, where different image processing algorithms correspond to image entropies in different intervals;
[0171] The target image blocks corresponding to all the image blocks are merged to obtain a first target image.
[0172] Optionally, after acquiring the original image, the method further includes:
[0173] Performing image enhancement processing on the original image to obtain a second target image;
[0174] After merging the target image blocks to obtain the first target image, the method further includes:
[0175] Acquire a fusion coefficient of the first target image and the second target image at each fusion position, where the fusion coefficient is used to characterize the amount of high-frequency information of the first target image and the second target image at the fusion position;
[0176] The first target image and the second target image are fused at each fusion position using a fusion coefficient to obtain a target image.
[0177] Optionally, the acquiring a fusion coefficient of the first target image and the second target image at each fusion position includes:
[0178] Extracting high-frequency features from the first target image to obtain a first high-frequency image;
[0179] Extracting high-frequency features from the second target image to obtain a second high-frequency image;
[0180] The coefficient product of the fusion position in the first high-frequency image and the second high-frequency image is calculated to obtain the fusion coefficient.
[0181] Optionally, the using a fusion coefficient to fuse the first target image and the second target image at each fusion position to obtain a target image includes:
[0182] Based on the fusion coefficient of each fusion position, a weighted sum is performed on the first image and the second image at each fusion position to obtain the target image.
[0183] Optionally, the acquiring a fusion coefficient of the first target image and the second target image at each fusion position includes:
[0184]
[0185] Among them, W x,y represents the fusion coefficient at the fusion position (x, y), I SR represents the first target image, I Ehance represents the second target image, (x, y) represents the position coordinates in the first target image and the second target image, σ is a preset coefficient, and the RGB2Gray (I SR ) indicates obtaining a grayscale image of the first target image, the RGB2Gray(I Ehance ) indicates obtaining a grayscale image of the second target image.
[0186] Optionally, the step of performing super-resolution reconstruction on the image block by using an image processing algorithm corresponding to the image entropy corresponding to the image block to obtain a target image block corresponding to the image block includes:
[0187] When the image entropy corresponding to the image block is within a first interval, a deep learning algorithm is used to perform super-resolution reconstruction on the image block; or, when the image entropy corresponding to the image block is within a second interval, an interpolation algorithm is used to perform super-resolution reconstruction on the image block to obtain a target image block corresponding to the image block; any value within the first interval is greater than any value within the second interval.
[0188] Optionally, the acquiring the gray value distribution of the image block and determining the image entropy corresponding to the image block according to the gray value distribution of the image block includes:
[0189] Obtaining a grayscale value corresponding to each pixel in the image block;
[0190] Obtaining the occurrence probability of each pixel corresponding to the grayscale value in the image block;
[0191] Determine the amount of information when a pixel corresponding to each gray value appears according to the occurrence probability;
[0192] The image entropy corresponding to the image block is determined according to the occurrence probability and the information amount corresponding to each gray value in the image block.
[0193] Optionally, the processor 501 includes a central processing unit and an embedded neural network processor, and the adopting a deep learning algorithm to perform super-resolution reconstruction on the image block includes:
[0194] Executing the deep learning algorithm through the embedded neural network processor to perform super-resolution reconstruction on the image block;
[0195] The adopting an interpolation algorithm to perform super-resolution reconstruction on the image block comprises:
[0196] The interpolation algorithm is executed by the central processing unit to perform super-resolution reconstruction on the image block.
[0197] Optionally, the processor 501 includes a graphics processor, and the performing image enhancement processing on the original image to obtain the second target image includes:
[0198] The second target image is obtained by performing image enhancement processing on the original image through the graphics processor.
[0199] In the embodiment of the present invention, after obtaining the original image, the original image is split to obtain at least two image blocks, and then the gray value distribution of each image block is obtained, and the image entropy corresponding to the image block is determined according to the gray value distribution. Since the image entropy is a parameter that characterizes the average amount of information in the image, at this time, different image processing algorithms can be corresponding to image entropies of different intervals, so that the image blocks are super-resolved using the image processing algorithms corresponding to the image entropy to obtain target image blocks, and then the target image blocks are merged into the first target image. In the embodiment of the present invention, since different image processing algorithms correspond to image entropies of different intervals, image blocks with different amounts of information can be processed by corresponding image processing algorithms in a branching manner, such as image blocks with low amounts of information can be processed by using image processing algorithms for processing images with low amounts of information, and image blocks with high amounts of information can be processed by using image processing algorithms for processing images with high amounts of information. Since image processing algorithms for processing images with low amounts of information are usually simple in operation, and image processing algorithms for processing images with high amounts of information are usually complex in operation, therefore, the branching of the original image reduces the overall amount of operation while ensuring the super-resolution effect of the image blocks, which not only ensures the speed and stability of the super-resolution, but also reduces power consumption and avoids jamming.
[0200] In an embodiment of the present invention, image enhancement processing is further performed on the original image to obtain a second target image, and the first target image and the second target image are fused based on a fusion coefficient at each fusion position, wherein the fusion coefficient is used to characterize the amount of high-frequency information of the first target image and the second target image at the fusion position, so that image fusion based on the fusion coefficient can retain more high-frequency information of the image, reduce detail loss, and effectively improve the effect of image optimization.
[0201] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0202] The communication interface is used for communication between the above terminal and other devices.
[0203] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0204] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0205] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions. When the instructions are executed on a computer, the computer executes the image processing method described in any one of the above embodiments.
[0206] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes the image processing method described in any one of the above embodiments.
[0207] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0208] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0209] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0210] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. An image processing method, characterized in that: The method comprises: Get the original image; Performing image enhancement processing on the original image to obtain a second target image; Splitting the original image to obtain at least two image blocks; For any of the image blocks, obtaining a grayscale value distribution of the image block, and determining an image entropy corresponding to the image block according to the grayscale value distribution of the image block; For any of the image blocks, super-resolution reconstruction is performed on the image block using an image processing algorithm corresponding to the image entropy corresponding to the image block to obtain a target image block corresponding to the image block, where different image processing algorithms correspond to image entropies in different intervals; Merging the target image blocks corresponding to all the image blocks to obtain a first target image; The first target image and the second target image are used as input, and the fusion coefficient is calculated by the following formula: Among them, W x,y represents the fusion coefficient at the fusion position (x, y), I SR represents the first target image, I Ehance represents the second target image, (x, y) represents the position coordinates in the first target image and the second target image, σ is a preset coefficient, and the RGB2Gray (I SR ) indicates obtaining a grayscale image of the first target image, the RGB2Gray(I Ehance ) represents obtaining a grayscale image of the second target image; the fusion coefficient is used to characterize the high-frequency information amount of the first target image and the second target image at the fusion position; The first target image and the second target image are fused at each fusion position using a fusion coefficient to obtain a target image.
2. The method according to claim 1, characterized in that The step of performing super-resolution reconstruction on the image block by using an image processing algorithm corresponding to the image entropy corresponding to the image block to obtain a target image block corresponding to the image block includes: When the image entropy corresponding to the image block is within the first interval, a deep learning algorithm is used to perform super-resolution reconstruction on the image block to obtain a target image block corresponding to the image block; or, When the image entropy corresponding to the image block is within the second interval, an interpolation algorithm is used to perform super-resolution reconstruction on the image block to obtain a target image block corresponding to the image block; Any value in the first interval is greater than any value in the second interval.
3. The method according to claim 1, characterized in that The acquiring the gray value distribution of the image block and determining the image entropy corresponding to the image block according to the gray value distribution of the image block includes: Obtaining a grayscale value corresponding to each pixel in the image block; Obtaining the occurrence probability of each pixel corresponding to the grayscale value in the image block; Determine the amount of information when a pixel corresponding to each gray value appears according to the occurrence probability; The image entropy corresponding to the image block is determined according to the occurrence probability and the information amount corresponding to each gray value in the image block.
4. The method according to claim 1, characterized in that: The obtaining of the fusion coefficient of the first target image and the second target image at each fusion position further includes: Extracting high-frequency features from the first target image to obtain a first high-frequency image; Extracting high-frequency features from the second target image to obtain a second high-frequency image; The coefficient product of the fusion position in the first high-frequency image and the second high-frequency image is calculated to obtain the fusion coefficient.
5. The method according to claim 1, characterized in that The step of fusing the first target image and the second target image at each fusion position using a fusion coefficient to obtain a target image includes: Based on the fusion coefficient of each fusion position, a weighted sum is performed on the first target image and the second target image at each fusion position to obtain the target image.
6. The method according to claim 2, characterized in that: Applicable to electronic devices including central processing units and embedded neural network processors; The adopting a deep learning algorithm to perform super-resolution reconstruction on the image block comprises: Executing the deep learning algorithm through the embedded neural network processor to perform super-resolution reconstruction on the image block; The adopting an interpolation algorithm to perform super-resolution reconstruction on the image block comprises: The interpolation algorithm is executed by the central processing unit to perform super-resolution reconstruction on the image block.
7. The method according to claim 1, characterized in that Applied to an electronic device including a graphics processor, the step of performing image enhancement processing on the original image to obtain a second target image includes: The second target image is obtained by performing image enhancement processing on the original image through the graphics processor.
8. An image processing device, characterized in that: The device comprises: An image acquisition module, used for acquiring original images; An image enhancement module, used for performing image enhancement processing on the original image to obtain a second target image; An image splitting module, used for splitting the original image to obtain at least two image blocks; A parameter acquisition module, used for acquiring, for any of the image blocks, a grayscale value distribution corresponding to the image block, and determining an image entropy corresponding to the image block according to the grayscale value distribution of the image block; A super-resolution module is used to perform super-resolution reconstruction on any of the image blocks by using an image processing algorithm corresponding to the image entropy corresponding to the image block to obtain a target image block corresponding to the image block, wherein different image processing algorithms correspond to image entropies in different intervals; An image merging module, used for merging the target image blocks corresponding to all the image blocks to obtain a first target image; The coefficient acquisition module is used to take the first target image and the second target image as input and calculate the fusion coefficient by the following formula: Among them, W x,y represents the fusion coefficient at the fusion position (x, y), I SR represents the first target image, I Ehance represents the second target image, (x, y) represents the position coordinates in the first target image and the second target image, σ is a preset coefficient, and the RGB2Gray (I SR ) indicates obtaining a grayscale image of the first target image, the RGB2Gray(I Ehance ) represents obtaining a grayscale image of the second target image; the fusion coefficient is used to characterize the high-frequency information amount of the first target image and the second target image at the fusion position; The image fusion module is used to fuse the first target image and the second target image at each fusion position using a fusion coefficient to obtain a target image.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 7 when executing a program stored in a memory.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Image processing method, image processing device, terminal device and readable storage medium
CN110310229A
Image processing method and device, model training method and device, equipment and storage medium
CN111784578A
Image processing method and device and electronic equipment
CN113570617A