An Image Enhancement Method Based on Relevance Parameter Gradient Descent

The associative parameter gradient descent method optimizes brightness and contrast in low-light images, addressing inefficiencies in existing methods by improving processing speed and image quality.

CN115482163BActive Publication Date: 2025-07-15UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211133297.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-17
Publication Date
2025-07-15
Estimated Expiration
2042-09-17

AI Technical Summary

Technical Problem

When using low-illumination images, it is difficult to effectively optimize multiple correlation parameters simultaneously, resulting in the image enhancement process being too long and ineffective.

Method used

Using a method based on the correlation parameter gradient descent, multi-parameter optimization iteration is performed by setting the brightness and contrast adjustment function, combining the loss function and image operation model, including the update formula of the brightness adjustment function, the contrast adjustment function, the loss function and the image operation model function, and the iteration process is optimized to improve image quality.

Benefits of technology

It significantly improves the quality of low-illumination images, shortens iteration time, reduces the oscillation of parameter updates, improves the complete structure and detailed performance of the image without the need for complex parameter setting and pre-training processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115482163B_ABST
    Figure CN115482163B_ABST
Patent Text Reader

Abstract

The present invention discloses an image enhancement method based on the gradient descent of correlation parameters, belonging to the technical field of image enhancement. The present invention provides a low-light image enhancement method based on the gradient descent of correlation parameters, which can solve the problem of gradient descent of correlation parameters and improve the quality of low-light images, so as to obtain images with complete structures, details, and natural clarity. It includes two ways of low-light image enhancement with correlation gradient descent without a constant term and with a constant term. The present invention can optimize and iterate multiple parameters simultaneously under the condition of correlation parameters, significantly improve the time accuracy, and enhance the quality of low-light images. It can accelerate the convergence speed, minimize the backtracking amplitude as much as possible, and effectively reduce the situation of oscillating back and forth near the optimal solution when updating parameters. The present invention is easy to reproduce, does not require setting complex parameters, has low requirements for basic hardware, and does not require a pre-training process and complex additional adjustments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and particularly to an image enhancement method based on correlation parameter gradient descent. Background Art

[0002] Gradient descent is an effective machine learning method, especially showing good results for optimization problems. Traditional gradient descent methods achieve the minimization of the loss function by optimizing the number of iterations, but such methods can only solve the optimization problem of independent multi-parameters.

[0003] Low-illumination images are mainly caused by insufficient illumination in the shooting environment, and have characteristics such as a narrow gray level range, high spatial correlation of adjacent pixels, and insignificant gray level changes. This makes information such as objects, backgrounds, details, and noises in the image contained in a narrow gray level range. Therefore, in order to improve the visual effect of low-illumination images, it is necessary to enhance or suppress the whole or part of the image to improve the image quality, enrich the image details, and facilitate the subsequent processing of the image.

[0004] Low-illumination image enhancement can increase the image brightness and contrast, highlight the image detail information, and ensure the image color information, enabling people to obtain more effective information from low-illumination images. Therefore, the low-illumination image enhancement technology still has important research significance.

[0005] Low-illumination image enhancement is beneficial to image processing and analysis. Seeking the optimal parameters among several enhancement methods is crucial for image quality. When image enhancement methods act continuously, it takes too long to traverse and iterate the parameters of each method. Therefore, in the case of correlation parameters, improving the gradient descent method and optimizing and iterating multiple parameters simultaneously is of great significance for solving the correlation parameter gradient descent problem and improving the quality of low-illumination images. Summary of the Invention

[0006] The present invention provides a low-illumination image enhancement method based on correlation parameter gradient descent to solve the correlation parameter gradient descent problem and improve the quality of low-illumination images, so as to obtain an image with a complete structure, details, and natural clarity.

[0007] An image enhancement method based on correlation parameter gradient descent of the present invention includes the following steps:

[0008] Step S1: Set two operation functions for adjusting brightness and contrast respectively;

[0009] Step S101: Set a brightness adjustment function, including adding up each pixel value of the RGB three channels of the image each time;

[0010] Step S102: Set the contrast adjustment function, including squaring and stretching each of the RGB channels of the image and then renormalizing to the mapping range;

[0011] Step S2: Set the loss function and the image operation model function;

[0012] Step S201: Set the loss function as: Loss = (Ty - Ty i ) 2 ;

[0013] where Ty represents the reference index, and Ty i represents the criterion index between the image obtained by processing the input image through the image operation and the reference image, and the criterion index is the mean squared error MSE between the images, or the peak signal-to-noise ratio PSNR between the images, or the structural similarity SSIM between the images;

[0014] Step S202: Set the image operation model function as: y i = θx, where x represents the input of the image operation model, θ represents the adjustment parameter of the image operation model, and y i represents the output of the image operation model. Among them, the image operation refers to the brightness adjustment operation or the contrast adjustment operation. Among them, the brightness adjustment operation is implemented through the brightness adjustment function based on the corresponding adjustment parameter, and the contrast adjustment operation is implemented through the contrast adjustment function based on the corresponding adjustment parameter;

[0015] Step S203: In each iteration, use the result of the brightness adjustment operation as the input of the contrast adjustment operation;

[0016] And after each iteration, update the adjustment parameters θ1 of the brightness adjustment function and θ2 of the contrast adjustment function through gradient descent based on the loss function Loss:

[0017]

[0018]

[0019] where Loss1 represents the loss function of the image operation processed as brightness adjustment, and Loss2 represents the loss function of the image operation as contrast adjustment; α and β respectively represent the learning rates of the adjustment parameters θ1 and θ2, k represents the number of iterations, respectively represent the adjustment parameter θ1 before and after the update, respectively represent the adjustment parameter θ2 before and after the update;

[0020] For the updated round up or down as the adjustment parameters θ1 and θ2 for the next iteration;

[0021] Step S204: When the number of iterations reaches the preset maximum number of iterations or the iteration accuracy (the loss value meets the specified adjustment. In this application, since the input of contrast adjustment is the output of brightness adjustment, when calculating the iteration accuracy, the loss value is calculated based on the criterion index between the currently contrast-adjusted image and the reference image) meets the preset requirements, stop the iteration to obtain the optimal adjustment parameters for brightness adjustment and contrast adjustment respectively;

[0022] Step S3: Use the optimal adjustment parameters for brightness adjustment and contrast adjustment to obtain the target enhanced image.

[0023] Further, replace the loss function with:

[0024]

[0025] where y represents the reference image and θx represents the output of the image operation model.

[0026] Further, in step S203, the updates of the adjustment parameter θ1 of the brightness adjustment function and the adjustment parameter θ2 of the contrast adjustment function are respectively:

[0027]

[0028]

[0029] where represents the image before the k-th brightness adjustment.

[0030] Further, replace the image operation model function in step S202 with:

[0031] y i = θx + b

[0032] where b represents the bias;

[0033] In step S203, it also includes the update of the bias b:

[0034]

[0035]

[0036] where Loss1 represents the loss function for the image operation processed as brightness adjustment, Loss2 represents the loss function for the image operation as contrast adjustment; b1 and b2 respectively represent the biases for brightness adjustment and contrast adjustment, α′ and β′ respectively represent the learning rates of the biases b1 and b2, b1 and b2 respectively represent the biases for brightness adjustment and contrast adjustment, k represents the number of iterations, respectively represent the bias b1 before and after the update, respectively represent the bias b2 before and after the update.

[0037] Furthermore, replace the loss function with:

[0038]

[0039] where y represents the reference image.

[0040] Furthermore, in step S203, the updates of the adjustment parameters θ1, θ2, and the biases b1, b2 are respectively:

[0041]

[0042]

[0043]

[0044]

[0045] where y1 and y2 respectively represent the reference image for brightness adjustment and the reference image for contrast adjustment, α1 and α2 respectively represent the learning rates of the adjustment parameters θ1 and θ2, and β1 and β2 respectively represent the learning rates of b1 and b2. represents the image before the k-th brightness adjustment (i.e., the input of the k-th brightness adjustment). represents the image before the k-th contrast adjustment (i.e., the input of the k-th contrast adjustment).

[0046] Furthermore, step S2 further includes: setting the backtracking step size to the output of the nearest contrast adjustment.

[0047] Compared with the prior art, the technical solution provided by the embodiments of the present invention has at least the following beneficial effects:

[0048] (1) Compared with other optimization algorithms based on gradient descent, the present invention can simultaneously optimize and iterate multiple parameters in the case of related parameters, significantly improving the time accuracy and effectively enhancing the quality of low-illumination images.

[0049] (2) In addition to being able to simultaneously optimize and iterate related parameters, the present invention can also accelerate the convergence speed and minimize the backtracking amplitude as much as possible. The embodiments of the present invention effectively reduce the situation of oscillating back and forth near the optimal solution when updating parameters.

[0050] (3) The present invention is simple to reproduce, does not require setting complex parameters, has low requirements for basic hardware, and does not require a pre-training process and complex additional adjustments. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.

[0052] Figure 1 Schematic diagram of the processing process of the image enhancement method based on the gradient descent of correlation parameters provided by the embodiments of the present invention;

[0053] Figure 2 Schematic diagram of image enhancement according to the embodiments of the present invention, where (a) is the low-light image used, (b) is the enhanced image after brightness adjustment in the 55th iteration; (c) is the enhanced image after contrast adjustment of image (b) in the 55th iteration; (d) is the final image after image enhancement;

[0054] Figure 3 Result of enhancing the low-light lung CT image in the embodiments of the present invention. Detailed implementation manners

[0055] To make the purpose, technical solutions and advantages of the present invention clearer, the following will further describe the embodiments of the present invention in detail in conjunction with the accompanying drawings. The following embodiments or accompanying drawings are used to illustrate the present invention, but not to limit the scope of the present invention.

[0056] The embodiments of the present invention provide a low-light image enhancement method based on the gradient descent of correlation parameters, which is used to solve the problem of gradient descent of correlation parameters, improve the iteration time accuracy, and can also improve the quality of low-light images to obtain images with complete structures, details, and natural clarity. As Figure 1 described, the processing process of the present invention includes: inputting a low-light image, setting a loss function and a model function, setting correlation parameter operations and obtaining a criterion index, and outputting an enhanced image with the optimal criterion index. A kind of image enhancement method based on the gradient descent of correlation parameters provided by the present invention includes two implementation manners. One is the low-light image enhancement method based on the correlation gradient descent without a constant term, and the other is the correlation gradient descent of the low-light image enhancement method including a constant term.

[0057] Among them, the low-light image enhancement method based on the correlation gradient descent without a constant term includes:

[0058] Step 1: Set two operation functions for adjusting brightness and contrast respectively;

[0059] Step 101: Set a brightness adjustment function, including accumulating each pixel value of the RGB three channels of the image each time;

[0060] Step 102: Set the contrast adjustment function, including squaring and stretching each of the RGB channels of the image and then renormalizing to the mapping range each time;

[0061] Step 2: Set the loss function and the model function for performing contrast adjustment on the original low-illumination image on the basis of brightness adjustment;

[0062] Step 201: Set the loss function as:

[0063] Loss=(y - y i ) 2 , (1)

[0064] where y is the criterion index (reference index) of the clear image, and y i represents the criterion index MSE / PSNR / SSIM of the low-illumination image after operation and the clear image. Since the parameter is an integer and the influence of the constant term is small, it can be set to 0;

[0065] The MSE in step 201 is the mean square error between the current image X and the reference image Y, and the calculation formula is as follows:

[0066]

[0067] where H and W respectively represent the height and width of the image;

[0068] The PSNR in step 201 is the peak signal-to-noise ratio, with the unit of dB. The larger the value, the smaller the distortion. The calculation formula is as follows:

[0069]

[0070] where n is the number of bits per pixel, generally taking 8, that is, the number of pixel gray levels is 256;

[0071] The SSIM in step 201 is the structural similarity between image x and image y, with the range from -1 to 1. The calculation formula is as follows:

[0072]

[0073] where μ is the average value, σ is the standard deviation, and σ xy is the covariance, and c1 and c2 are constants to maintain stability to avoid the denominator being 0.

[0074] Step 202: Set the model function (omitting the constant term) as follows:

[0075] y i =θx, (5)

[0076] where y iIt represents the model output, i.e., the image output after brightness adjustment or contrast adjustment. x represents the model input, with the initial value being the original low-light image, and θ represents the model parameters, i.e., the brightness adjustment parameter or the contrast adjustment parameter;

[0077] Step 203: At each iteration, use the result of brightness adjustment as the input for contrast adjustment; the brightness adjustment function and the contrast adjustment function are:

[0078]

[0079] Among them, is the update parameter of the j-th layer for the i-th operation ((1 represents the brightness adjustment operation, 2 represents the contrast adjustment operation)), represents the result of the j-th layer of the i-th operation, represents the input of the j-th layer of the i-th operation, and n represents the number of layers (the number of iterations).

[0080] Furthermore, the loss function in Step 2 is expressed as:

[0081]

[0082]

[0083] Step 3: After jointly optimizing and iterating the brightness and contrast, based on the MSE / PSNR / SSIM between the image obtained by operating on the original low-light image and the clear image, to obtain the optimal adjustment parameters for brightness and contrast adjustment;

[0084] Step 4: To accelerate convergence and ensure continuous downward convergence and reduce the backtracking amplitude, slightly adjust the brightness adjustment parameter and the contrast adjustment parameter at each iteration;

[0085] Step 4 includes the following sub-steps:

[0086] Step 401: Set the learning rate α of the brightness adjustment parameter and the update formula as:

[0087]

[0088] Among them, Loss1 represents the loss of brightness adjustment, i.e., the square of the difference between the criterion index of the image after brightness adjustment and the reference index, or one-half of this square, and it can also be calculated according to formula (7). Let and θ1 be an integer parameter, so it needs to be rounded up or down after each adjustment.

[0089] The iterative formula for obtaining the parameter θ1 is:

[0090]

[0091] Step 402: Set the learning rate β and update formula of the contrast adjustment parameter as follows:

[0092]

[0093] Among them, let Since the operation of parameter θ2 is based on θ1, therefore:

[0094]

[0095] Furthermore, the contrast adjustment parameter update formula in Step 402 can be expressed as follows:

[0096]

[0097] The iterative formula for obtaining parameter θ2 is:

[0098]

[0099] Step 403: To accelerate convergence, set the backtracking step size, hoping to make it converge downward all the time and minimize the backtracking amplitude as much as possible. Finally, set the number of iterations or iteration accuracy, and the optimal parameters for brightness adjustment and contrast adjustment are obtained.

[0100] Step 5: Iterate the original low-illumination image to the adjustment parameters of optimal brightness and contrast adjustment to obtain the target enhanced image.

[0101] On the other hand, the low-illumination image enhancement method of relevance gradient descent including a constant term in the present invention includes:

[0102] Step 1: Set two operation functions for adjusting brightness and contrast respectively;

[0103] Step 2: Set the loss function and the model function. For the original low-illumination image, perform contrast adjustment on the basis of brightness adjustment;

[0104] The said Step 2 includes the following sub-steps:

[0105] Step 201: Set the loss function as:

[0106] Loss=(y - y i ) 2 , (15)

[0107] Among them, y is the criterion index of the clear image itself, and y i represents the criterion index MSE / PSNR / SSIM of the low-illumination image after operation and the clear image;

[0108] Step 202: Set the model function (including the constant term b, that is, the bias) as follows:

[0109] y i = θx + b, (16)

[0110] Step 203: At each iteration, use the result of brightness adjustment as the input for contrast adjustment; the brightness adjustment function and the contrast adjustment function are as follows:

[0111]

[0112] where is the update parameter of the j-th layer of the i-th operation ( is the adjustment parameter, is the bias), represents the result of the j-th layer of the i-th operation, represents the input of the j-th layer of the i-th operation.

[0113] Furthermore, the loss function in Step 2 is expressed as:

[0114]

[0115] Even further, the loss function regarding θ1, b1 (the bias of brightness adjustment) in Step 2 is expressed as:

[0116]

[0117] Even further, the loss function regarding θ2, b2 (the bias of contrast adjustment) in Step 2 is expressed as:

[0118]

[0119] where y1 and y2 represent the brightness adjustment reference image and the contrast adjustment reference image respectively.

[0120] Even further, the partial derivatives of the loss function regarding θ, b in Step 2 are expressed as:

[0121]

[0122]

[0123] Step 3: After simultaneously optimizing and iterating the brightness and contrast, based on the MSE / PSNR / SSIM between the original low - illumination image after operation and the clear image, obtain the adjustment parameters for optimal brightness and contrast adjustment;

[0124] Step 4: To accelerate convergence and ensure continuous downward convergence while reducing the fallback amplitude, slightly adjust the brightness adjustment parameter and the contrast adjustment parameter respectively at each iteration;

[0125] Step 4 includes the following sub - steps:

[0126] Step 401: Iteratively update the parameter θ1 of Operation 1. Set the learning rate of θ1 to α1 and the update formula as:

[0127]

[0128] Thus, the iterative formula for the parameter θ1 is obtained as:

[0129]

[0130] Step 402: Iteratively update the parameter b1 of Operation 1. Set the learning rate of b1 to β1 and the update formula as:

[0131]

[0132] Thus, the iterative formula for the parameter b1 is obtained as:

[0133]

[0134] Step 403: Iteratively update the parameter θ2 of Operation 2. Set the learning rate of θ2 to α2 and the update formula as:

[0135]

[0136] Among them, the parameter of Operation 2 is based on the parameter of Operation 1. Therefore:

[0137]

[0138]

[0139] Thus, the iterative formula for the parameter θ2 is obtained as:

[0140]

[0141] Step 404: Iteratively update the parameter b2 of Operation 1. Set the learning rate of b2 to β2 and the update formula as:

[0142]

[0143] Thus, the iterative formula for the parameter b2 is obtained as:

[0144]

[0145] Step 405: To accelerate convergence, set the backtracking step size, hoping to converge downward continuously and minimize the backtracking amplitude as much as possible. Finally, set the number of iterations or the iteration precision, and then the optimal parameters for brightness adjustment and contrast adjustment are obtained.

[0146] Step 5: Iterate the adjustment parameters of the original low-illumination image to the optimal brightness and contrast adjustment to obtain the target enhanced image.

[0147] Embodiment

[0148] A low-illumination image enhancement method based on relevance gradient descent, and the implementation steps include:

[0149] Step 1: Set two operation functions for adjusting brightness and contrast respectively. The specific implementation steps include:

[0150] Step 101: Set the brightness adjustment function, including adding 20 to each pixel value of each of the RGB three channels of the image each time;

[0151] Step 102: Set the contrast adjustment function, including squaring and stretching each of the RGB three channels of the image each time, and then renormalizing to [0, 255];

[0152] Step 2: Set the loss function and the model function. For the original low-illumination image, perform contrast adjustment on the basis of brightness adjustment.

[0153] Among them, the loss function is shown in formula (1). Since the parameter is an integer and the constant term has little influence, it can be set to 0; that is, taking (y - y i ) 2 as the loss value, and the objective function is to minimize this loss value.

[0154] Step 202: Set the model function (omitting the constant term), as shown in formula (5).

[0155] Step 203: Each time during iteration, use the result of brightness adjustment as the input for contrast adjustment; the brightness adjustment function and the contrast adjustment function are respectively as shown in formula (6); furthermore, the loss function in step 2 can also be set according to formula (7).

[0156] Step 3: After simultaneously optimizing and iterating brightness and contrast, according to the MSE / PSNR / SSIM between the original low-illumination image after operation and the clear image, obtain the adjustment parameters for optimal brightness and contrast adjustment;

[0157] Step 4: To accelerate convergence and ensure continuous downward convergence and reduce the fallback amplitude, finely adjust the brightness adjustment parameter and the contrast adjustment parameter respectively each time during iteration. The specific implementation steps include:

[0158] Step 401: During the iteration of the original low-illumination image, first perform brightness adjustment to obtain the image with enhanced brightness.

[0159] For example, in the 55th iteration, the image after first performing brightness enhancement is as Figure 2as shown in (b). Then, based on Equation (10), the adjustment parameter for brightness adjustment is updated; then, after rounding down or up, it is used as the adjustment parameter for brightness adjustment in the next iteration process;

[0160] Step 402: During the iteration process of the original low-illumination image, contrast adjustment is performed based on brightness adjustment to obtain an image with enhanced contrast.

[0161] For example, in the 55th iteration, contrast adjustment is performed based on brightness adjustment, and the enhanced image is as shown in Figure 2 (c). Then, based on Equation (14), the adjustment parameter for brightness adjustment is updated; then, after rounding down or up, it is used as the adjustment parameter for contrast adjustment in the next iteration process;

[0162] Step 403: To accelerate convergence, the backtracking step size -ω is set as: y i = -ω, hoping to make it converge downward all the time and minimize the backtracking amplitude as much as possible. Set:

[0163] y i = -ω → y i = -ωn (33)

[0164] where y i = θx.

[0165] Finally, the number of iterations or the iteration accuracy is set to obtain the optimal parameters for brightness adjustment and contrast adjustment respectively.

[0166] Among them, in this embodiment, a comparison is made with independent two-parameter gradient descent, and the order of correlation parameters, time accuracy, PSNR, and parameter output results are changed, as shown in Table 1:

[0167] Table 1 Two-parameter comparison experiment

[0168] Time(s) PSNR(%) Parameter-Result(f1 / f2) f1,f2 4.68 63.2 [2,52] f1->f2 3.86 63.2 [2,52] f2->f1 3.88 63.2 [1,52]

[0169] Among them, Time represents the running time of the program; PSNR is the peak signal-to-noise ratio, which is used to measure the distortion size of the image; Parameter-Result represents the two-parameter value.

[0170] Step 5: For the original low-illumination image as shown in Figure 2 (a), it is iterated to the adjustment parameters of optimal brightness and contrast adjustment to obtain the target enhanced image as shown in Figure 2 (d), and Figure 3 as shown.

[0171] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention described here do not represent all embodiments consistent with the present invention. The ideas are only examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0172] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

[0173] The above are only some embodiments of the present invention. For those of ordinary skill in the art, without departing from the inventive concept of the present invention, several deformations and improvements can still be made, and these all belong to the protection scope of the present invention.

Claims

1. An image enhancement method based on the gradient descent of relevance parameters, characterized in that, It includes the following steps: Step S1: Set two operation functions for adjusting brightness and contrast respectively; Step S101: Set the brightness adjustment function, including accumulating each pixel value of the RGB three channels of the image each time; Step S102: Set the contrast adjustment function, including square stretching each of the RGB three channels of the image and then re-normalizing to the mapping range; Step S2: Set the loss function and the image operation model function; Step S201: Set the loss function as: Loss = (Ty - Ty i ) 2 ; Among them, Ty represents a reference index, Ty i represents a criterion index between the image after the input image is processed by image operations and the reference image, and the criterion index is the mean square error MSE between the images, or the peak signal-to-noise ratio PSNR between the images, or the structural similarity SSIM between the images; Step S202: Set the image operation model function as: y i = θx, where x represents the input of the image operation model, θ represents the adjustment parameter of the image operation model, and y i represents the output of the image operation model. Among them, the image operation refers to a brightness adjustment operation or a contrast adjustment operation. Among them, the brightness adjustment operation is implemented through a brightness adjustment function based on the corresponding adjustment parameter, and the contrast adjustment operation is implemented through a contrast adjustment function based on the corresponding adjustment parameter; Step S203: Each time an iteration is performed, the result of the brightness adjustment operation is used as the input of the contrast adjustment operation; And after each iteration, based on the loss function Loss, the adjustment parameters θ1 of the brightness adjustment function and the adjustment parameter θ2 of the contrast adjustment function are updated by gradient descent: Among them, Loss1 represents the loss function for the image operation of brightness adjustment, and Loss2 represents the loss function for the image operation of contrast adjustment; α and β respectively represent the learning rates of the adjustment parameters θ1 and θ2, and k represents the number of iterations. respectively represent the adjustment parameter θ1 before and after the update. respectively represent the adjustment parameter θ2 before and after the update. For the updated round up or down to obtain the adjustment parameters θ1 and the number θ2 for the next iteration; Step S204: When the number of iterations reaches the preset maximum number of iterations or the iteration accuracy meets the preset requirements, stop the iteration to obtain the optimal adjustment parameters for brightness adjustment and contrast adjustment respectively; Step S3: Use the optimal adjustment parameters for brightness adjustment and contrast adjustment to obtain the target enhanced image.

2. The method according to claim 1, wherein Replace the loss function with: where y represents the reference image and θx represents the output of the image operation model.

3. The method according to claim 2, characterized in that, In step S203, the updates of the adjustment parameter θ1 of the brightness adjustment function and the adjustment parameter θ2 of the contrast adjustment function are respectively: Among them, represents the image before the k-th brightness adjustment.

4. The method according to claim 1, wherein Replace and set the image operation model function in step S202 to: y i = θx + b where b represents the bias; In step S203, it also includes the update of the bias b: Among them, Loss1 represents the loss function for image operation processing as brightness adjustment, and Loss2 represents the loss function for image operation as contrast adjustment; b1 and b2 respectively represent the biases for brightness adjustment and contrast adjustment, α′ and β′ respectively represent the learning rates of biases b1 and b2, b1 and b2 respectively represent the biases for brightness adjustment and contrast adjustment, and k represents the number of iterations. respectively represent the bias b1 before and after update respectively represent the bias b2 before and after update.

5. The method according to claim 4, wherein Replace the loss function with: where y represents the reference image.

6. The method according to claim 5, wherein In step S203, the updates of the adjustment parameters θ1, θ2, and the biases b1, b2 are respectively: Among them, y1 and y2 respectively represent the luminance adjustment reference diagram and the contrast adjustment reference diagram, α1 and α2 respectively represent the learning rates of the adjustment parameters θ1 and θ2, and β1 and β2 respectively represent the learning rates of b1 and b2. represents the image before the k-th luminance adjustment. represents the image before the k-th contrast adjustment.

7. The method according to any one of claims 1 to 6, characterized in that, Step S2 also includes: setting the step size of the backtracking to the output of the nearest contrast adjustment.

8. The method according to any one of claims 1 to 6, characterized in that, The peak signal-to-noise ratio PSNR between images is: where n is the number of bits per pixel and MSE represents the mean square error between images.

9. The method according to any one of claims 1 to 6, characterized in that The structural similarity between images is: Among them, x and y represent two images for structural similarity calculation, and μ x , μ y represent the mean values of x and y of the images respectively, and σ x , σ y represent the standard deviations of x and y of the images respectively, and σ xy represents the covariance of x and y, and c1 and c2 are preset constants.