An image optimization processing method and device

Through two Retinex processing and adaptive grayscale adjustment image optimization methods, the problem of insufficient dark effect and color richness in the image enhancement process in the prior art is solved, and the brightness and color improvement is achieved.

CN114463220BActive Publication Date: 2025-07-22INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210132178.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-14
Publication Date
2025-07-22
Estimated Expiration
2042-02-14

AI Technical Summary

Technical Problem

The existing Retinex method cannot take into account the enhancement effect in the dark and the richness of the overall color of the image in the process of image enhancement, and there are problems of halo and color fading.

Method used

Two Retinex processing was used, using the difference result of the full 1 matrix and the Gaussian core as the core, and fused it, combined with adaptive grayscale adjustment, the gain coefficient matrix was determined for image optimization processing.

Benefits of technology

The brightness enhancement of the image and the low gray area enhancement are achieved, the color intensity and color information of the image are highlighted, and the problems of halo phenomenon and color fading in the prior art are solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114463220B_ABST
    Figure CN114463220B_ABST
Patent Text Reader

Abstract

The present invention provides an image optimization processing method and apparatus, which relate to the technical field of data processing and can be used in the financial field or other technical fields. The method includes: acquiring an original image, performing channel conversion processing on the original image to obtain a luminance image; performing Retinex processing on the luminance image twice, and fusing the output results obtained from the two Retinex processings to obtain a fused luminance image; processing the original image according to the original image, the luminance image, and the fused luminance image to obtain an image optimization processing result. The apparatus executes the above method. The image optimization processing method and apparatus provided by the embodiments of the present invention realize the enhancement of the luminance of the image and the enhancement of the low gray-level region, not only improving the color intensity of the image but also highlighting the color information of the image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to an image optimization processing method and device. Background Art

[0002] During the image acquisition process, due to factors such as a dark acquisition environment or uneven lighting, the image information in the darker areas of the image is not highly recognizable.

[0003] The Retinex image enhancement method based on the human visual system has a good image enhancement effect for images with low contrast and uneven illumination, and is widely used in production and life. Although the Single Scale Retinex (SSR) algorithm can improve the contrast of the image and effectively improve the brightness of the image, it cannot balance the hue restoration and color dynamic compression, the image is white as a whole, and the halo phenomenon is prone to appear in the enhanced image. In response to the halo phenomenon of SSR, the Multi-Scale Retinex (MSR) method was proposed, which uses Gaussian kernels of different scales to perfectly solve the halo phenomenon in the enhanced image, but the result of MSR processing is lighter in color. For this reason, based on MSR, Multi-Scale Retinex (MSR with Color Restoration, MSRCR) restores the color in the image by color compensation. However, whether it is the single-scale or multi-scale Retinex method, in the process of image enhancement, it is impossible to take into account the image enhancement effect in the dark and the richness of the overall color of the image. Summary of the invention

[0004] In view of the problems in the prior art, the embodiments of the present invention provide an image optimization processing method and device, which can at least partially solve the problems in the prior art.

[0005] In one aspect, the present invention provides an image optimization processing method, comprising:

[0006] Acquire an original image, and perform channel conversion processing on the original image to obtain a brightness image;

[0007] Performing two Retinex processes on the brightness image respectively, and fusing the output results obtained from the two Retinex processes to obtain a fused brightness image;

[0008] The original image is processed according to the original image, the brightness image and the fused brightness image to obtain an image optimization processing result.

[0009] Among them, the kernels used in the two Retinex processes are respectively the difference result between the all-ones matrix and the Gaussian kernel, and the Gaussian kernel.

[0010] Among them, the value of the Gaussian surround scale of the kernel used in both Retinex processes is determined according to the size of the original image.

[0011] Among them, processing the original image according to the original image, the luminance image, and the fused luminance image to obtain an image optimization processing result includes:

[0012] Determining a gain coefficient matrix according to the original image, the luminance image, and the fused luminance image;

[0013] Performing dot product calculation on the gain coefficient matrix and the original image to obtain the original image after gain processing;

[0014] Performing adaptive gray scale adjustment processing on the original image after gain processing to obtain the image optimization processing result.

[0015] Among them, determining the gain coefficient matrix according to the original image, the luminance image, and the fused luminance image includes:

[0016] Calculating the channel gain according to the maximum and minimum gray values of the three channels in the original image;

[0017] Taking the ratio of the fused luminance image to the luminance image as the luminance gain coefficient;

[0018] Taking the minimum value among the channel gain and the luminance gain coefficient as the gain coefficient matrix.

[0019] Among them, determining the value of the Gaussian surround scale of the kernel according to the size of the original image includes:

[0020] Determining the length value and width value of the original image according to the size of the original image;

[0021] Selecting the maximum value among the length value and the width value, dividing the maximum value by 2, rounding down the division result, and taking the rounded-down result as the value of the Gaussian surround scale of the kernel.

[0022] Among them, performing channel conversion processing on the original image to obtain a luminance image includes:

[0023] Converting the original image from the RGB channel to the gray channel to obtain the luminance image.

[0024] On the one hand, the present invention proposes an image optimization processing device, including:

[0025] An acquisition unit, configured to acquire an original image, perform channel conversion processing on the original image to obtain a luminance image;

[0026] A fusion unit, configured to perform two Retinex processes on the luminance image respectively, and fuse the output results obtained from the two Retinex processes to obtain a fused luminance image;

[0027] An optimization unit, configured to process the original image according to the original image, the luminance image, and the fused luminance image to obtain an image optimization processing result.

[0028] On the other hand, an embodiment of the present invention provides an electronic device, including: a processor, a memory, and a bus, where

[0029] The processor and the memory complete communication with each other through the bus;

[0030] The memory stores program instructions executable by the processor, and the processor can execute the following method by invoking the program instructions:

[0031] Acquire an original image, perform channel conversion processing on the original image to obtain a luminance image;

[0032] Perform two Retinex processes on the luminance image respectively, and fuse the output results obtained from the two Retinex processes to obtain a fused luminance image;

[0033] Process the original image according to the original image, the luminance image, and the fused luminance image to obtain an image optimization processing result.

[0034] An embodiment of the present invention provides a non-transitory computer-readable storage medium, including:

[0035] The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions cause the computer to execute the following method:

[0036] Acquire an original image, perform channel conversion processing on the original image to obtain a luminance image;

[0037] Perform two Retinex processes on the luminance image respectively, and fuse the output results obtained from the two Retinex processes to obtain a fused luminance image;

[0038] Process the original image according to the original image, the luminance image, and the fused luminance image to obtain an image optimization processing result.

[0039] The image optimization processing method and device provided by an embodiment of the present invention obtain an original image, perform channel conversion processing on the original image to obtain a luminance image; perform Retinex processing on the luminance image twice, and fuse the output results obtained from the two Retinex processings to obtain a fused luminance image; process the original image according to the original image, the luminance image, and the fused luminance image to obtain an image optimization processing result. Through two Retinex processings and fusion, the luminance enhancement and low-gray area enhancement of the image are achieved, which not only improves the color intensity of the image but also highlights the color information of the image. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following-described drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts. In the drawings:

[0041] Figure 1 is a flowchart of the image optimization processing method provided by an embodiment of the present invention.

[0042] Figure 2 is a structural diagram of the image optimization processing device provided by an embodiment of the present invention.

[0043] Figure 3 is a schematic physical structure diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0044] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer and more understandable, the following will further describe the embodiments of the present invention in detail with reference to the drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but not to limit the present invention. It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other arbitrarily.

[0045] Figure 1 is a flowchart of the image optimization processing method provided by an embodiment of the present invention. As Figure 1 shown, the image optimization processing method provided by an embodiment of the present invention includes:

[0046] Step S1: Obtain an original image, and perform channel conversion processing on the original image to obtain a luminance image.

[0047] Step S2: Perform Retinex processing on the luminance image twice, and fuse the output results obtained from the two Retinex processes to obtain a fused luminance image.

[0048] Step S3: Process the original image based on the original image, the luminance image, and the fused luminance image to obtain an image optimization processing result.

[0049] In the above step S1, the device acquires the original image, performs channel conversion processing on the original image to obtain a luminance image. The device can be a computer device that executes this method, etc. The performing channel conversion processing on the original image to obtain a luminance image includes:

[0050] Convert the original image from the RGB channel to the grayscale channel to obtain the luminance image. The main reason for choosing to obtain the luminance image through the RGB channel is that the RGB channel contains all the color information of the image, and after converting to the grayscale channel, it can better reflect the change of the luminance intensity of the image.

[0051] The formula for converting RGB space to grayscale space is:

[0052] I gray = 0.299I R + 0.587I G + 0.114I B

[0053] where, I R 、I G 、I B are the R, G, and B channels of the original image respectively. The luminance image is denoted as I gray .

[0054] In the above step S2, the device performs Retinex processing on the luminance image twice, and fuses the output results obtained from the two Retinex processes to obtain a fused luminance image.

[0055] The kernels used in the two Retinex processes are the difference result between the all-ones matrix and the Gaussian kernel, and the Gaussian kernel. The difference result between the all-ones matrix and the Gaussian kernel can be corresponding to the first Retinex process, and a luminance enhancement image is obtained through the first Retinex process.

[0056] Performing Retinex processing using the difference result between the all-ones matrix and the Gaussian kernel can collect image luminance information from the periphery of the image, ensuring that the image luminance information is more real.

[0057] The second Retinex process can use a Gaussian kernel, and the enhanced image of the low-gray area can be obtained through the second Retinex process. By fusing it with the image brightness information collected from the periphery of the image, the brightness enhancement of the image and the enhancement of the low-gray area can be achieved simultaneously.

[0058] The output result corresponding to the difference between the all-ones matrix and the Gaussian kernel is denoted as R l (x, y); the output result corresponding to the Gaussian kernel is denoted as R s (x, y). Where x and y represent the position coordinates of the pixel points respectively.

[0059] Fuse the output results obtained from the two Retinex processes to obtain the fused brightness image, including:

[0060] The fused brightness image is obtained according to the following formula:

[0061] A(x, y) = αR l (x, y) + (1 - α)R s (x, y)

[0062] Among them, A(x, y) is the fused brightness image, α is the color and brightness balance parameter, and can be selected as 0.9. The enhancement effect of the dark area of the image can be quantitatively controlled.

[0063] The value of the Gaussian surround scale of the kernel used in both Retinex processes is determined according to the size of the original image. The Gaussian surround scale of the kernel is a conventional technique used in Retinex processing. The value of the Gaussian surround scale c includes:

[0064] Determine the length value and width value of the original image according to the size of the original image;

[0065] Select the larger value among the length value and the width value, divide the larger value by 2, round down the division result, and use the rounded-down result as the value of the Gaussian surround scale of the kernel.

[0066] The value of the Gaussian surround scale c of the kernel can be determined according to the following formula:

[0067] c = floor[max(size(I)) / 2

[0068] Among them, size(·) represents obtaining the size of the original image, floor[· represents rounding down, I represents the original image, and the rounding down is explained as follows:

[0069] If the calculation result is 3.6, the rounded-down result is 3; if the calculation result is 3.2, the rounded-down result is also 3.

[0070] In the above step S3, the device processes the original image according to the original image, the luminance image, and the fused luminance image to obtain an image optimization processing result.

[0071] The processing of the original image according to the original image, the luminance image, and the fused luminance image to obtain an image optimization processing result includes:

[0072] Determine a gain coefficient matrix according to the original image, the luminance image, and the fused luminance image;

[0073] The determining a gain coefficient matrix according to the original image, the luminance image, and the fused luminance image includes:

[0074] Calculate the channel gain according to the maximum and minimum gray values of the three channels in the original image; the channel gain can be calculated according to the following formula:

[0075] C b (x,y) = 2×(2 bit -1) / [max(I)+min(I)]

[0076] where C b (x,y) represents the channel gain, bit represents the color depth of the original image, and can be 8; max(I) represents the maximum gray value, and min(I) represents the minimum gray value.

[0077] Take the ratio of the fused luminance image to the luminance image as the luminance gain coefficient;

[0078] That is, the luminance gain coefficient

[0079] Take the minimum of the channel gain and the luminance gain coefficient as the gain coefficient matrix.

[0080] That is, the gain coefficient matrix A b (x,y) = min[C b (x,y), C a (x,y)].

[0081] Perform a dot product calculation of the gain coefficient matrix and the original image to obtain the original image after gain processing;

[0082] That is, the original image after gain processing = A b (x,y)·I.

[0083] Perform adaptive gray-scale adjustment processing on the original image after gain processing to obtain the image optimization processing result. Adaptive gray-scale adjustment processing is a mature method in the art and will not be elaborated here. Through adaptive gray-scale adjustment processing, the contour information of the image can be effectively improved, and the recognition performance of the image content can be further enhanced.

[0084] The image optimization processing method provided by the embodiment of the present invention obtains an original image, performs channel conversion processing on the original image to obtain a luminance image; performs two Retinex processes on the luminance image respectively, and fuses the output results obtained from the two Retinex processes to obtain a fused luminance image; processes the original image according to the original image, the luminance image, and the fused luminance image to obtain an image optimization processing result. Through two Retinex processes and fusion, the luminance enhancement and low-gray-scale region enhancement of the image are realized, which not only improves the color intensity of the image but also highlights the color information of the image.

[0085] Table 1 shows the objective evaluation of the overall mean and information entropy of the images obtained by the method of the embodiment of the present invention and other methods; among them, the overall mean of the image is used to evaluate the overall luminance of the image, and the information entropy is used to evaluate the color and content richness of the image. The maximum values of the indicators in Table 1 are shown in italics and bold.

[0086] Table 1

[0087]

[0088] It can be seen that the Mean (overall mean of the image) in the method of this article in Table 1 is not much different from the optimal method; the Entropy (information entropy) is significantly better than other methods. Therefore, overall, the method of this article is better than other methods.

[0089] Furthermore, the kernels used in the two Retinex processes are respectively the difference result between the all-ones matrix and the Gaussian kernel, and the Gaussian kernel. Refer to the above description and will not be elaborated here.

[0090] The image optimization processing method provided by the embodiment of the present invention adopts two Retinex processes with different kernels, which is beneficial to obtaining more refined luminance gain and low-gray-scale region gain effects.

[0091] Furthermore, the value of the Gaussian surround scale of the kernel used in both Retinex processes is determined according to the size of the original image. Refer to the above description and will not be elaborated here.

[0092] The image optimization processing method provided by the embodiment of the present invention optimizes the value of the Gaussian surround scale of the kernel, further realizes the luminance enhancement and low-gray-scale region enhancement of the image, which not only improves the color intensity of the image but also highlights the color information of the image.

[0093] Further, processing the original image according to the original image, the luminance image, and the fused luminance image to obtain an image optimization processing result includes:

[0094] Determine a gain coefficient matrix according to the original image, the luminance image, and the fused luminance image; refer to the above description for details and will not be elaborated here.

[0095] Perform a dot product calculation on the gain coefficient matrix and the original image to obtain the original image after gain processing; refer to the above description for details and will not be elaborated here.

[0096] Perform adaptive gray-scale adjustment processing on the original image after gain processing to obtain the image optimization processing result; refer to the above description for details and will not be elaborated here.

[0097] The image optimization processing method provided by the embodiment of the present invention can effectively enhance the contour information of the image and further improve the recognizable performance of the image content through adaptive gray-scale adjustment processing.

[0098] Further, determining the gain coefficient matrix according to the original image, the luminance image, and the fused luminance image includes:

[0099] Calculate the channel gain according to the maximum and minimum gray levels of the three channels in the original image; refer to the above description for details and will not be elaborated here.

[0100] Use the ratio of the fused luminance image to the luminance image as the luminance gain coefficient; refer to the above description for details and will not be elaborated here.

[0101] Use the minimum value of the channel gain and the luminance gain coefficient as the gain coefficient matrix; refer to the above description for details and will not be elaborated here.

[0102] The image optimization processing method provided by the embodiment of the present invention further realizes the luminance enhancement effect and low gray-level area enhancement effect of the image that can be quantified.

[0103] Further, determining the value of the kernel Gaussian surround scale according to the size of the original image includes:

[0104] Determine the length value and width value of the original image according to the size of the original image; refer to the above description for details and will not be elaborated here.

[0105] Select the maximum value of the length value and the width value, divide the maximum value by 2, round down the division result, and use the rounded-down result as the value of the kernel Gaussian surround scale; refer to the above description for details and will not be elaborated here.

[0106] The image optimization processing method provided by the embodiment of the present invention further optimizes the value of the kernel Gaussian surround scale, further realizes the brightness enhancement of the image and the enhancement of the low-gray region, not only improves the color intensity of the image but also highlights the color information of the image.

[0107] Further, the performing channel conversion processing on the original image to obtain a luminance image includes:

[0108] Converting the original image from the RGB channel to the grayscale channel to obtain the luminance image. Refer to the above description and details will not be repeated.

[0109] The image optimization processing method provided by the embodiment of the present invention, since the RGB channel contains all the color information of the image, and after switching to the grayscale channel, it can better reflect the change of the luminance intensity of the image.

[0110] It should be noted that the image optimization processing method provided by the embodiment of the present invention can be used in the financial field, and can also be used in any technical field other than the financial field. The embodiment of the present invention does not limit the application field of the image optimization processing method.

[0111] Figure 2 is a schematic structural diagram of an image optimization processing device provided by an embodiment of the present invention. As Figure 2 shown, the image optimization processing device provided by the embodiment of the present invention includes an acquisition unit 201, a fusion unit 202, and an optimization unit 203, where:

[0112] The acquisition unit 201 is configured to acquire an original image, perform channel conversion processing on the original image to obtain a luminance image; the fusion unit 202 is configured to perform two Retinex processes on the luminance image respectively, and fuse the output results obtained from the two Retinex processes to obtain a fused luminance image; the optimization unit 203 is configured to process the original image according to the original image, the luminance image, and the fused luminance image to obtain an image optimization processing result.

[0113] Specifically, the acquisition unit 201 in the device is configured to acquire an original image, perform channel conversion processing on the original image to obtain a luminance image; the fusion unit 202 is configured to perform two Retinex processes on the luminance image respectively, and fuse the output results obtained from the two Retinex processes to obtain a fused luminance image; the optimization unit 203 is configured to process the original image according to the original image, the luminance image, and the fused luminance image to obtain an image optimization processing result.

[0114] The image optimization processing device provided by an embodiment of the present invention acquires an original image, performs channel conversion processing on the original image to obtain a luminance image; performs two Retinex processes on the luminance image respectively, and fuses the output results obtained from the two Retinex processes to obtain a fused luminance image; processes the original image according to the original image, the luminance image, and the fused luminance image to obtain an image optimization processing result. Through two Retinex processes and fusion, the luminance enhancement and low-gray-level area enhancement of the image are realized, which not only improves the color intensity of the image but also highlights the color information of the image.

[0115] The embodiments of the image optimization processing device provided by the embodiments of the present invention can specifically be used to execute the processing procedures of the above method embodiments, and their functions will not be elaborated here. Reference can be made to the detailed descriptions of the above method embodiments.

[0116] Figure 3 It is a schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. As Figure 3 shown, the electronic device includes: a processor 301, a memory 302, and a bus 303;

[0117] Among them, the processor 301 and the memory 302 communicate with each other through the bus 303;

[0118] The processor 301 is used to call the program instructions in the memory 302 to execute the methods provided by the above method embodiments, for example, including:

[0119] Acquire an original image, perform channel conversion processing on the original image to obtain a luminance image;

[0120] Perform two Retinex processes on the luminance image respectively, and fuse the output results obtained from the two Retinex processes to obtain a fused luminance image;

[0121] Process the original image according to the original image, the luminance image, and the fused luminance image to obtain an image optimization processing result.

[0122] This embodiment discloses a computer program product. The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided by the above method embodiments, for example, including:

[0123] Acquire an original image, perform channel conversion processing on the original image to obtain a luminance image;

[0124] Perform Retinex processing on the luminance image twice, and fuse the output results obtained from the two Retinex processings to obtain a fused luminance image;

[0125] Process the original image according to the original image, the luminance image, and the fused luminance image to obtain an image optimization processing result.

[0126] This embodiment provides a computer-readable storage medium that stores a computer program, and the computer program causes the computer to execute the methods provided in the above method embodiments, for example, including:

[0127] Obtain an original image, perform channel conversion processing on the original image to obtain a luminance image;

[0128] Perform Retinex processing on the luminance image twice, and fuse the output results obtained from the two Retinex processings to obtain a fused luminance image;

[0129] Process the original image according to the original image, the luminance image, and the fused luminance image to obtain an image optimization processing result.

[0130] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0131] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 a block or multiple blocks.

[0132] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction device that implements the function specified in one process Figure 1 one process or more processes and / or blocks Figure 1 one block or more blocks.

[0133] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, such that a series of operational steps are performed on the computer or other programmable apparatus to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable apparatus provide steps for implementing the function specified in one process Figure 1 one process or more processes and / or blocks Figure 1 one block or more blocks.

[0134] In the description of this specification, the descriptions with reference to the terms "one embodiment", "a specific embodiment", "some embodiments", "for example", "example", "specific example", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0135] The above-described specific embodiments have further elaborated on the objectives, technical solutions, and beneficial effects of the present invention. It should be understood that the above are only specific embodiments of the present invention and are not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection scope of the present invention.

Claims

1. An image optimization processing method, characterized in that, Including: Obtain an original image, convert the original image from the RGB channel to the grayscale channel to obtain a luminance image; Perform two Retinex processes on the luminance image respectively, and fuse the output results obtained from the two Retinex processes to obtain a fused luminance image; wherein, the kernels used in the two Retinex processes are respectively the difference result between a matrix of all 1s and a Gaussian kernel, and the Gaussian kernel; Process the original image according to the original image, the luminance image, and the fused luminance image to obtain an image optimization processing result.

2. The image optimization processing method according to claim 1, wherein The value of the Gaussian surround scale of the kernel used in both Retinex processes is determined according to the size of the original image.

3. The image optimization processing method according to any one of claims 1 to 2, characterized in that The processing the original image according to the original image, the luminance image, and the fused luminance image to obtain an image optimization processing result includes: Determine a gain coefficient matrix according to the original image, the luminance image, and the fused luminance image; Perform a dot product calculation on the gain coefficient matrix and the original image to obtain the original image after gain processing; Perform adaptive grayscale adjustment processing on the original image after gain processing to obtain the image optimization processing result.

4. The image optimization processing method according to claim 3, wherein, The determining a gain coefficient matrix according to the original image, the luminance image, and the fused luminance image includes: Calculate the channel gain according to the maximum grayscale value and the minimum grayscale value of the three channels in the original image; Use the ratio of the fused luminance image to the luminance image as the luminance gain coefficient; Use the minimum of the channel gain and the luminance gain coefficient as the gain coefficient matrix.

5. The image optimization processing method according to claim 1, wherein Determining the value of the Gaussian surround scale of the kernel according to the size of the original image includes: Determine the length value and the width value of the original image according to the size of the original image; Select the maximum of the length value and the width value, divide the maximum by 2, round down the division result, and use the rounded-down result as the value of the Gaussian surround scale of the kernel.

6. An image optimization processing device, characterized in that, Including: An acquisition unit for acquiring an original image, converting the original image from the RGB channel to the grayscale channel to obtain a luminance image; A fusion unit for performing two Retinex processes on the luminance image respectively, and fusing the output results obtained from the two Retinex processes to obtain a fused luminance image; wherein, the kernels used in the two Retinex processes are respectively the difference result between a matrix of all 1s and a Gaussian kernel, and the Gaussian kernel; An optimization unit for processing the original image according to the original image, the luminance image, and the fused luminance image to obtain an image optimization processing result.

7. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 5.