Self-adaptive nonlinear image enhancement method and system for low-illumination scene of mobile terminal

By employing an adaptive nonlinear image enhancement method, which combines grayscale conversion, noise reduction, and dynamic downsampling, the problem of poor image enhancement performance on mobile devices in low-light environments is solved, thereby improving recognition accuracy and computational efficiency.

CN120807338APending Publication Date: 2025-10-17GUANGDONG POLYTECHNIC NORMAL UNIV
View PDF 0 Cites 10 Cited by

Patent Information

Application Number
CN202510873760.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Existing image enhancement methods in low-light environments suffer from limited enhancement effects, poor adaptability, noise amplification, loss of detail, and insufficient real-time performance in mobile applications, which affects the accuracy of industrial recognition.

Method used

An adaptive nonlinear image enhancement method is adopted, which includes grayscale processing, local variance denoising, median filtering, dynamic downsampling, nonlinear brightness enhancement and contrast enhancement. The method combines lookup tables to optimize computational efficiency and adaptively adjusts parameters to adapt to different lighting conditions.

Benefits of technology

It significantly improves the computing efficiency and recognition accuracy of mobile devices, solves the problem of poor image enhancement effect in low light environment, and achieves efficient image enhancement effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807338A_ABST
    Figure CN120807338A_ABST
Patent Text Reader

Abstract

The invention provides a self-adaptive nonlinear image enhancement method and system for a low-light scene of a mobile terminal, and relates to the technical field of image enhancement, and the method comprises the steps: carrying out the image preprocessing and noise reduction, and carrying out the graying and noise suppression of an input color image through a local variance self-adaptive algorithm; adaptive down-sampling is carried out, and the down-sampling proportion is dynamically adjusted according to the image resolution and the content complexity, so that the processing efficiency is improved; brightness adaptive enhancement is carried out, and the overall brightness of the image is rapidly improved by adopting an Otsu method and a lookup table; contrast nonlinear enhancement: enhancing image details and contrast in combination with a Laplace operator and local mean adjustment; and color restoration: restoring the resolution through bilinear interpolation and performing weighted fusion to realize natural color reconstruction. And finally, a high-quality image of which the brightness, the contrast ratio and the color are remarkably improved is output. According to the invention, the recognition accuracy and processing efficiency of the low-illumination image are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image enhancement, in particular to a self-adaptive nonlinear image enhancement method and system for mobile terminal low-light scenes. BACKGROUND

[0002] With the continuous improvement of camera performance of mobile devices such as smartphones, tablets, etc., image recognition applications based on mobile terminals have been widely used in the industrial field. For example, in the scenarios of warehouse logistics, production and manufacturing, equipment inspection, quality detection, etc., workers often use mobile phones to take pictures of barcodes, two-dimensional codes, product labels, and part surfaces for identification, realizing automatic data collection and intelligent analysis.

[0003] However, the lighting conditions in industrial scenarios are complex and changeable, especially in low-light environments such as night work, warehouse shadow areas, and equipment interiors. The images taken by mobile phones often have problems such as insufficient brightness, blurred details, obvious noise, and color distortion. These problems can seriously affect the accuracy of subsequent image recognition, and even lead to recognition failure, affecting production efficiency and data reliability. Therefore, low-light image enhancement technology has become a key link to improve the accuracy of industrial mobile terminal recognition.

[0004] Currently, the common techniques for low-light image enhancement mainly include the following categories, but all have the following shortcomings in the industrial mobile terminal recognition scenario:

[0005] (1) Histogram equalization method

[0006] This method stretches the gray scale distribution of the image to improve the overall contrast, which can increase the image brightness to some extent. However, in low-light environments, histogram equalization can easily cause local overexposure and loss of details in the image, and cannot effectively suppress noise.

[0007] (2) Gamma correction method

[0008] Gamma correction uses nonlinear mapping to enhance image brightness, with simple algorithm and small calculation amount, suitable for mobile terminal implementation. However, its enhancement parameters usually need to be set manually, lacking adaptability, and it is difficult to automatically adjust the optimal parameters for different light intensities and industrial objects.

[0009] (3) Retinex theory and its variants

[0010] The Retinex method simulates the separation of light and reflection by the human eye, which can better enhance the naturalness and details of the image. However, the traditional Retinex algorithm has high computational complexity, and real-time processing on mobile terminals has performance bottlenecks. In addition, Retinex is prone to color distortion and "halo" artifacts when there is a lot of noise in low-light environments, affecting the stability of industrial recognition.

[0011] (4) Low-light enhancement algorithm based on deep learning

[0012] In recent years, convolutional neural networks (CNN), generative adversarial networks (GAN), etc. are widely used in low-light image enhancement. Such methods perform well on public datasets and can adaptively enhance different types of images. However, deep models usually have a large number of parameters, and require high computing power and memory for mobile devices, making it difficult to deploy in real time on mobile devices in industrial sites. SUMMARY

[0013] The technical problem to be solved by the present application is to provide an adaptive nonlinear image enhancement method and system for mobile low-light scenes, which significantly improves the operation efficiency and recognition accuracy of mobile devices while ensuring the enhancement effect.

[0014] To solve the above technical problems, the technical solutions of the present application are as follows:

[0015] In a first aspect, an adaptive nonlinear image enhancement method for mobile low-light scenes is provided, the method comprising:

[0016] Step S1: converting the input color image from RGB space to grayscale space, and generating a grayscale image using a weighted average method;

[0017] Step S2: calculating the local variance based on the grayscale image obtained in step S1 to evaluate the noise level, and performing median filtering denoising processing on the grayscale image when the local variance exceeds a set threshold;

[0018] Step S3: downsampling the grayscale image after denoising processing in step S2, and adaptively determining the final downsampling ratio by dynamically analyzing the image size, grayscale standard deviation, and edge density characteristics to generate a low-resolution grayscale image;

[0019] Step S4: calculating the global brightness segmentation threshold using the Otsu method for the low-resolution grayscale image obtained in step S3, constructing a nonlinear brightness enhancement function based on the threshold, and realizing pixel-level brightness adaptive enhancement through a pre-generated lookup table;

[0020] Step S5: calculating the global Laplacian response mean based on the low-resolution grayscale image obtained in step S3, adaptively determining the box filter window size and calculating the local mean image; dynamically adjusting the nonlinear enhancement parameters based on the standard deviation of the local mean image, calculating the exponential enhancement factor based on the normalized grayscale value and the local brightness reference benchmark, and performing pixel-level power transformation on the image after brightness enhancement in step S4 using the exponential enhancement factor to realize nonlinear contrast enhancement;

[0021] Step S6: bilinear interpolation up-sampling the contrast-enhanced image of step S5 to the original input resolution;

[0022] Step S7: color restoration by adaptively fusing the original color image components with the enhanced grayscale values through an adaptive weighted fusion method;

[0023] Step S8: outputting the enhanced color image after adaptive brightness enhancement, contrast enhancement, and color restoration.

[0024] The second aspect is an adaptive nonlinear image enhancement system for mobile terminal low-light scenes, comprising:

[0025] A conversion module for converting the input color image from RGB space to grayscale space and generating a grayscale image using a weighted average method;

[0026] A denoising module for calculating the local variance based on the obtained grayscale image to assess the noise level, and performing median filter denoising processing on the grayscale image when the local variance exceeds a set threshold;

[0027] An analysis module for down-sampling the denoised grayscale image, adaptively determining the final down-sampling ratio by dynamically analyzing the image size, grayscale standard deviation, and edge density characteristics, and generating a low-resolution grayscale image;

[0028] An enhancement module for calculating the global brightness segmentation threshold using the Otsu method on the obtained low-resolution grayscale image, constructing a nonlinear brightness enhancement function based on the threshold, and implementing pixel-level brightness adaptive enhancement through a pre-generated lookup table;

[0029] A transformation module for calculating the global Laplacian response mean based on the obtained low-resolution grayscale image, adaptively determining the box filter window size and calculating the local mean image; dynamically adjusting the nonlinear enhancement parameters based on the standard deviation of the local mean image, calculating the exponential enhancement factor in combination with the normalized grayscale value and the local brightness reference benchmark; and performing pixel-level power transformation on the brightness-enhanced image using the exponential enhancement factor to achieve nonlinear contrast enhancement;

[0030] A processing module for bilinear interpolation up-sampling the contrast-enhanced image to the original input resolution; for the restored resolution image, adaptively fusing the original color image components with the enhanced grayscale values through an adaptive weighted fusion method to achieve color restoration, and outputting the enhanced color image after adaptive brightness enhancement, contrast enhancement, and color restoration.

[0031] The third aspect is a computing device, comprising:

[0032] one or more processors;

[0033] a memory device storing one or more programs, when executed by the one or more processors, cause the one or more processors to implement the above method.

[0034] In a fourth aspect, a computer readable storage medium storing a program, which when executed by a processor, implements the above method.

[0035] The above scheme of the present application at least includes the following beneficial effects:

[0036] By performing gray-scale and local variance adaptive noise reduction preprocessing on the input image, combining resolution and content complexity adaptive downsampling to improve processing efficiency, and using Otsu method and lookup table to realize rapid adaptive enhancement of brightness, and then based on Laplace operator and local mean adaptive nonlinear contrast enhancement to enhance details, and finally through bilinear interpolation to restore resolution and weighted fusion to realize natural color restoration, this method significantly improves the operation efficiency and recognition accuracy of mobile terminals while ensuring the enhancement effect, effectively solving the problems of limited enhancement effect, poor adaptability, noise amplification, detail loss and insufficient real-time performance of existing methods in industrial mobile terminal recognition scenarios. BRIEF DESCRIPTION OF DRAWINGS

[0037] Figure 1 A step flow chart of the adaptive nonlinear image enhancement method for mobile terminal low-light scene of the present application.

[0038] Figure 2 A low-light scene gray image before processing by the adaptive nonlinear image enhancement method for mobile terminal low-light scene of the present application.

[0039] Figure 3 An enhanced gray image after processing by the adaptive nonlinear image enhancement method for mobile terminal low-light scene of the present application. DETAILED DESCRIPTION

[0040] Exemplary embodiments of the present disclosure will be described more fully hereinafter with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure can be more thoroughly understood, and the scope of the present disclosure can be accurately conveyed to those skilled in the art.

[0041] As Figure 1 shown, an embodiment of the present application proposes an adaptive nonlinear image enhancement method for mobile terminal low-light scene, which comprises:

[0042] Step S1 image preprocessing: converting the input color image from RGB space to grayscale space, using weighted average method to obtain a grayscale image;

[0043] The specific steps are as follows:

[0044] Step S11: obtaining color space components: for each pixel point Image original (x,y) in the input original color image Image original , extract its color space components, including red component (R), green component (G) and blue component (B), as the input data for subsequent grayscale processing.

[0045] Step S12: image grayscale processing: according to the weighted average method, the red component R, the green component G and the blue component B of each pixel point obtained in step S11 are processed for grayscale processing. Specifically, the grayscale value Gray of the pixel point is calculated by the following formula:

[0046] Gray = 0.299 * R + 0.587 * G + 0.114 * B (1)

[0047] Where 0.299, 0.587, 0.114 are the weighted coefficients of each component. The calculated grayscale value Gray is taken as the pixel value of the pixel point in the grayscale image, and a single-channel grayscale image Image original_gray is generated.

[0048] Specifically, assuming that an input color picture Image original with a resolution of 1920x1080 is input, for each pixel point Image original (x,y), its RGB components are extracted as follows:

[0049] R = Image original (x,y,0);

[0050] G = Image original (x,y,1);

[0051] B = Image original (x,y,2);

[0052] Suppose the RGB components of one of the pixel points are R = 120, G = 200, and B = 65. Substituting into the grayscale value Gray calculation formula:

[0053] Gray = 0.299 * 120 + 0.587 * 200 + 0.114 * 65 = 160.69;

[0054] Generally, the grayscale value is rounded to a positive integer, so the grayscale value of the pixel point is 161.

[0055] Step S2 image denoising: calculate the local variance of the gray image obtained in S1 to evaluate the noise level, and if the local variance is greater than a set threshold, use median filtering for denoising processing;

[0056] The specific steps are:

[0057] Step S21: calculate the noise level: for the gray image Image original_gray obtained in S1, for each pixel point Image original_gray (x,y) in the image, whose gray value is I original_gray (x,y), calculate the variance of the gray values of all pixels in the neighborhood window centered on the pixel point as the local variance of the pixel point If the pixel point is located at the boundary, all pixels outside the boundary are filled with the nearest boundary pixel value. Specifically, The calculation method is as follows:

[0058] For each pixel point Image original_gray (x,y), the set of pixel gray values in its neighborhood window is M(x,y):

[0059] M(x,y) = {I original_gray (d,f) | x-k≤d≤x+k, y-k≤f≤y+k, d≥0, f≥0} (2)

[0060] Wherein, k is the radius of the window, d and f are the coordinates of the pixel points in the neighborhood window.

[0061] The mean value μ original_gray (x,y) of the pixels in the neighborhood window is:

[0062]

[0063] The local variance is:

[0064]

[0065] Step S22 noise detection and judgment: compare the local variance of each pixel point with the preset noise threshold, if the local variance is greater than the noise threshold, it is considered that the noise level is high, and denoising processing is needed; otherwise, no processing is needed.

[0066] Step S23 median filtering denoising processing: for the pixel region with local variance greater than the threshold, use median filtering algorithm for denoising processing, that is, select the pixel gray values in the neighborhood window centered on the pixel point, and take the median as the new gray value of the center pixel. Finally, a new gray image Imagedown_noise_gray Specifically, the noise reduction processing process is as follows:

[0067] For the pixel point satisfying , a neighborhood window M(x, y) of the same size is selected as the center, all gray values in the window are sorted according to the size, and the median Median(M(x, y)) is taken as the new gray value of the pixel point Image down_noise_gray (x, y).

[0068] Wherein, T noise is the noise threshold, preferably, T noise = 30.

[0069] Specifically, taking a gray scale image with a resolution of 3x3 as an example, assuming that the neighborhood window radius k selected in the noise reduction processing is 1, then the neighborhood window size of each pixel point is 3x3, and the original gray scale image gray scale values are shown in Table 1:

[0070] Table 1: Gray scale image gray scale value table for noise reduction process example

[0071]

[0072] Next, the pixel point with pixel coordinates (1, 1) in the image is calculated as an example:

[0073] (1) The pixel values contained in the neighborhood window M(1, 1) with a size of 3x3 are:

[0074] M(1, 1) = {120, 125, 130, 122, 255, 128, 121, 124, 127};

[0075] (2) Calculate the mean value of the pixels in the window:

[0076]

[0077] (3) Calculate the local variance:

[0078]

[0079] In turn, the square of the difference between each pixel and the mean value is calculated: (120-139.11) 2 = 365.19, (125-139.11) 2 = 199.09, (130-139.11) 2 = 82.99, (122-139.11) 2 = 292.75, (255-139.11) 2 = 13430.49, (128-139.11) 2= 123.43, (121-139.11) 2 = 327.97, (124-139.11) 2 = 228.31, (127-139.11) 2 = 146.65.

[0080] Summation:

[0081] 365.19 + 199.09 + 82.99 + 292.75 + 13430.49 + 123.43 + 327.97 + 228.31 + 146.65 = 15196.87

[0082] Therefore,

[0083] (4) Noise detection and judgment

[0084] Suppose the set noise threshold is: T noise = 30.

[0085] Since Therefore, it is considered that the noise level of this pixel point is high, and noise reduction processing is needed.

[0086] (5) Median filter noise reduction processing

[0087] For the pixel point (1, 1) that satisfies , take 3

[0088] neighborhood window with it as the center, and all the gray values in the window are:

[0089] M(1, 1) = {120, 125, 130, 122, 255, 128, 121, 124, 127};

[0090] Sort it from small to large:

[0091] {120, 121, 122, 124, 125, 127, 128, 130, 255};

[0092] Take the median:

[0093] Median(M(1, 1)) = 125;

[0094] Therefore, the new gray value of the noise-reduced pixel point (1, 1) is 125.

[0095] Step S3 image downsampling: adopt an image resolution and content complexity-based downsampling strategy for the gray image after the S2 noise reduction processing, dynamically analyze the image size, gray standard deviation and edge density characteristics, adaptively determine the optimal downsampling ratio, and generate a low-resolution image for subsequent enhancement processing;

[0096] The specific steps are as follows:

[0097] Step S31 extracts image feature parameters: the gray-scale image Image down_noise_gray after noise reduction is processed to extract key feature parameters for adaptive down-sampling, which includes the following steps:

[0098] Step S311 calculates the gray-scale standard deviation σ: assuming that the image width is W, the height is H, the total number of pixels is N, and the gray-scale value of each pixel point is I down_noise_gray (x, y), then the average gray-scale value μ and the gray-scale standard deviation σ are solved by the following formulas:

[0099]

[0100] Step S312 calculates the edge density E: the edge detection algorithm is used to process the gray-scale image after noise reduction to obtain the edge value B(x, y) of the binary edge image, wherein the calculation formula of B(x, y) is as follows:

[0101]

[0102] The number of edge pixels N edge is counted:

[0103]

[0104] The edge density E is calculated:

[0105]

[0106] Step S313 obtains the target resolution S target : the target resolution S target is obtained according to the pre-determined target resolution.

[0107] Step S32 determines the adaptive down-sampling ratio: based on the parameters obtained in S31, the down-sampling ratio scale is calculated by using the following adaptive formula:

[0108]

[0109] Wherein, tanh is the hyperbolic tangent function.

[0110] Step S33 down-sampling processing: according to the scale value calculated in S32, the gray-scale image Image down_noise_gray after noise reduction is scaled to obtain a low-resolution image Image down_scale_gray , which is used as the input of subsequent image enhancement processing.

[0111] Specifically, taking a denoised gray image as an example, assuming that the image width is W=3, the height is H=4, the total number of pixels is N=12, and the pixel gray value is shown in the following Table 2:

[0112] Table 2 Example of image down-sampling operation Gray image gray value table

[0113]

[0114] (1) Calculate the gray mean μ:

[0115]

[0116] The sum of all pixel gray values is: 120+130+125+128+135+126+124+127+123+122+129+

[0117] 124=1513;

[0118]

[0119] (2) Calculate the gray standard deviation σ:

[0120]

[0121] Square of the difference between each pixel and the mean value:

[0122] (120-126.08) 2 =36.97, (130-126.08) 2 =15.37, (125-126.08) 2 =1.17;

[0123] (128-126.08) 2 =3.69, (135-126.08) 2 =79.57, (126-126.08) 2 =0.0064;

[0124] (124-126.08) 2 =4.33, (127-126.08) 2 =0.85, (123-126.08) 2 =9.49, (122-126.08) 2 =16.65, (129-126.08) 2 =8.53, (124-126.08) 2 =4.33.

[0125] Sum:

[0126] 36.97 + 15.37 + 1.17 + 3.69 + 79.57 + 0.0064 + 4.33 + 0.85 + 9.49 + 16.65 + 8.53 + 4.33 = 181;

[0127]

[0128] (3) Calculate edge density E

[0129] Suppose the edge value B(x, y) of the binary edge image obtained after detecting the edge by the Canny algorithm is as shown in Table 3 (1 is an edge, and 0 is a non-edge):

[0130] Table 3 Example of image downsampling operation Gray image edge value table

[0131]

[0132]

[0133] (4) Count the number of edge pixels:

[0134] N edge = 1 + 1 + 1 + 1 = 4;

[0135] (5) Calculate edge density:

[0136]

[0137] (6) Obtain target resolution:

[0138] Suppose the target resolution size is set to 2x2, so S target = 2;

[0139] (7) Calculate adaptive downsampling ratio:

[0140]

[0141] Substitute the numerical values: σ = 3.87, E = 0.333, S target = 2, max(W, H) = max(3, 4) = 4;

[0142] Obtained:

[0143] Therefore,

[0144] (8) Perform downsampling operation:

[0145] According to the calculated adaptive downsampling ratio scale = 0.5, scale the denoised gray image by the ratio, and the size of the original image 3x4 after scaling is: W '= 4 x 0.5 = 2, H ' = 3 x 0.5 = 1.5, in actual operation, usually take integer, so the size of the down-sampled is 2 x 2, and a low-resolution gray image Image down_scale_gray .

[0146] Step S4 image brightness enhancement: first, the S3 obtained low-resolution gray image is used to adaptively calculate the global brightness segmentation threshold of the image by Otsu method (OTSU). Based on the threshold, the optimal enhancement parameter is determined, and a non-linear brightness enhancement function is constructed to realize the adaptive enhancement of pixel-level brightness. In order to improve the calculation efficiency of mobile terminal device, the fast mapping strategy of lookup table (LUT) is used to realize the fast mapping of pixel value, so as to optimize the operation speed while ensuring the enhancement effect;

[0147] The specific steps are as follows:

[0148] Step S41 image gray normalization processing: the low-resolution image Image down_scale_gray obtained by S3 is subjected to gray normalization processing. Specifically, for each pixel point of the image, the original gray value I down_scale_gray (x, y) is obtained, and the normalized gray value I n (x, y) is obtained by the following formula:

[0149]

[0150] Wherein, the value range of I n (x, y) is [0, 1].

[0151] Step S42 adaptive determination of global brightness segmentation point: based on Otsu method (OTSU algorithm), the global brightness segmentation point is automatically calculated for the normalized gray image of S41. Specifically, it includes the following steps:

[0152] Step S421 statistics of pixel gray histogram: the distribution of all pixel gray values is counted to construct a gray histogram. Specifically, each pixel in the image is traversed, and the counter corresponding to its gray value is added by one to obtain the number of pixels of each gray level.

[0153] Step S422 calculation of pixel gray probability distribution: according to the histogram obtained by S421, the probability corresponding to each gray value is calculated:

[0154]

[0155] Wherein, n i is the number of pixels with gray value i, N k is the total number of pixels of the low-resolution image obtained by S3, and P(i) is the probability of pixels with gray value i.

[0156] Step S423 traverses all possible segmentation points: To determine the optimal global grayscale segmentation point, each possible segmentation point L within the brightness value range is processed as follows:

[0157] (1) Calculate the cumulative probability of pixels on both sides of the segmentation point:

[0158] For the current segmentation point L, first calculate the sum of the probabilities of all pixels on its left (including L) and right (excluding L), which are recorded as the background pixel ratio w0(L) and the foreground pixel ratio w1(L), respectively:

[0159]

[0160] Among them, P(q) is the probability of a pixel with a grayscale value of q, and P(t) is the probability of a pixel with a grayscale value of t.

[0161] (2) Calculate the average grayscale of pixels on both sides of the segmentation point:

[0162] After obtaining the pixel ratio, the background average gray value μ0(L) and the foreground average gray value μ1(L) are further calculated:

[0163]

[0164] (3) Calculate the inter-class variance corresponding to the current segmentation point:

[0165] Based on the above calculation results, solve the inter-class variance under the current segmentation point L As an indicator to measure the segmentation effect:

[0166]

[0167] (4) Determine the optimal split point:

[0168] Traverse all split points L and find the variance between classes The largest L best , as the global grayscale segmentation point:

[0169]

[0170] Step S43 determines the brightness nonlinear enhancement parameter: according to the segmentation point L obtained in step S42 best , adaptively determine the parameter z of the nonlinear enhancement function, specifically:

[0171]

[0172] Preferably, L min_target =50,L max_target =150.

[0173] Step S44 pixel-level brightness non-linear enhancement: based on the non-linear enhancement function parameter z obtained in S43, a brightness non-linear enhancement function suitable for the image is constructed. Specifically, for each pixel normalized gray value I n (x,y) in S41, the following transformation formula is used to realize pixel-level brightness non-linear enhancement, and the brightness-enhanced image Image ale_gray :

[0174]

[0175] (x,y) is the gray value after non-linear brightness enhancement. n

[0176] Step S45 lookup table construction and application: in order to improve the running efficiency of the algorithm and avoid repeated complex power operation and multiplication operation at each pixel point, the output results of all possible input pixel values (0-255) after the non-linear enhancement function in S44 are calculated and stored in advance to construct a lookup table, including the following steps:

[0177] Step S451 normalization processing: for each possible pixel gray value j, its corresponding normalized value v is calculated:

[0178]

[0179] Step S452 lookup table component calculation: for each normalized gray value v, based on the non-linear brightness enhancement function in S44, it is decomposed into three parts of non-linear transformation components, specifically as follows:

[0180] First part: calculate (I n (x,y)) (0.75×z+0.25) ;

[0181] Second part: calculate 0.4×(1-I n (x,y))(1-z);

[0182] Third part: calculate (I n (x,y)) (2-z) ;

[0183] The above three components are denoted as lut1[j], lut2[j], and lut3[j], respectively, and the lookup table output value LUT[j] corresponding to each pixel value j can be expressed as:

[0184]

[0185] The calculation formulas of lut1[j], lut2[j], and lut3[j] are as follows: ​

[0186]

[0187] Step S453 looks up the table application: in the image enhancement process, for each pixel, directly index its original pixel value from the lookup table to read the pre-computed brightness enhancement value, without complex power and multiplication operations at runtime, achieving extremely high processing speed, especially suitable for mobile terminals.

[0188] Specifically, a low-resolution gray image Image down_scale_gray For example, its pixel matrix is 4x4, and the pixel value is shown in Table 4:

[0189] Table 4 Example of image brightness enhancement operation Gray value table of gray image

[0190]

[0191]

[0192] (1) Adaptive determination of global brightness split point

[0193] 1. Statistics of pixel gray histogram

[0194] Count the number of occurrences of each pixel gray value: (30: 1), (35: 1), (40: 1), (50: 2), (70: 3), (80: 1), (90: 2), (100: 2), (110: 1), (120: 1), (140: 1).

[0195] Total number of pixels: N k = 16

[0196] (2) Calculate the probability distribution of pixels:

[0197]

[0198] Calculate the probability distribution of each pixel value:

[0199] (3) Traverse all possible split points L to find the split point L that maximizes the inter-class variance best : The value of the split point L is (0, 255). We calculate the inter-class variance of each L in turn to find the maximum.

[0200] According to the example image, take the pixel value L = 70 as an example:

[0201] w0(70) = P(30) + P(35) + P(40) + P(50) + P(70);

[0202] w0(70) = 0.0625 + 0.0625 + 0.0625 + 0.125 + 0.1875 = 0.5;

[0203] w1(70) = 1 - w0(70) = 0.5;

[0204]

[0205]

[0206] L = 70 inter-class variance:

[0207]

[0208] According to the calculation process steps of , other pixel points can be solved by substituting:

[0209] Therefore, the maximum inter-class variance is 672.25, corresponding to L best = 70;

[0210] (4) Determine the luminance nonlinear enhancement parameter

[0211]

[0212] Preferably, L min_target = 50, L max_target = 150.

[0213] Here, 50 < L best = 70 < 150, so

[0214] (5) Pixel-level luminance nonlinear enhancement

[0215] Pixel-level luminance nonlinear enhancement formula:

[0216]

[0217] At this time, z = 0.2, substituting:

[0218]

[0219] Take the pixel point (x = 0, y = 0) as an example, its normalized pixel value

[0220] Substituting the above luminance enhancement formula:

[0221]

[0222] According to I' nThe calculation process steps of (0, 0) are substituted into other pixel points to solve the normalized gray value of the entire image after brightness enhancement, as shown in Table 5 below:

[0223] Table 5 Normalized gray value table of the image after brightness enhancement

[0224]

[0225] Step S5 image contrast enhancement: first, based on the low-resolution gray image obtained in S3, the high-frequency component of the entire image is calculated using the Laplace operator, and the window size of the box filter is determined based on the global Laplace response mean value to realize the smoothing regulation and control of different contrast regions; then, the low-resolution gray image is subjected to local mean calculation using the box filter parameters, a pixel-level brightness reference benchmark is established, and the standard deviation of the local mean image is counted to dynamically adjust the nonlinear contrast enhancement parameters. Further, for each pixel, based on its normalized brightness value, local brightness reference and adaptive enhancement parameters, an exponential enhancement factor is calculated. Finally, using the above exponential enhancement factor, the pixel gray value of the image after brightness enhancement in S4 is subjected to power transformation to realize pixel-level nonlinear contrast enhancement of the image after brightness enhancement, effectively improving the image detail performance and local contrast.

[0226] The specific steps are as follows:

[0227] Step S51: Calculate the global contrast feature: for the low-resolution image Image down_scale_gray obtained in S3, first calculate the Laplace response mean Q, which is used to measure the texture richness of the entire image, specifically including the following steps:

[0228] Step S511 definition of Laplace operator: a standard two-dimensional Laplace operator is used:

[0229]

[0230] Step S512 image convolution: for the low-resolution gray image Image down_scale_gray obtained in S3, for each pixel point Image down_scale_gray (x, y) thereof, take its gray value I down_scale_gray (x, y) and perform convolution operation with the S511 Laplace operator K to obtain the corresponding Laplace response gray value L(x, y). If the pixel point is located at the boundary, all the pixels outside the boundary are filled with the nearest boundary pixel value:

[0231] L(x, y) = K * I down_scale_gray (x, y) (27)

[0232] where * represents two-dimensional convolution operation.

[0233] Step S513 absolute value processing: to measure the texture intensity of the image, take the absolute value of the convolution result:

[0234] L abs (x,y) = |L(x,y)| (28)

[0235] Step S514 whole image mean statistics: calculate the Laplace response mean Q of the whole image:

[0236]

[0237] wherein H1 and W1 are the low-resolution gray image obtained by the S3

[0238] Image down_scale_gray high and wide.

[0239] Step S52 determine box filter parameters: based on the value range of the S514 Laplace response mean Q, adopt piecewise linear interpolation method to adaptively determine the filter kernel size c of the box filter, realize the regional smoothing control of different contrast images.

[0240]

[0241] Preferably, c min = 90, c max = 120, Q min = 5, Q max = 20;

[0242] Step S53 establish local brightness reference benchmark: according to the box filter parameters c determined by the S52, perform box filter operation on the low-resolution gray image Image down_scale_gray obtained by the S3. Take each pixel point Image down_scale_gray (x,y) as the center, calculate the average value I conv (x,y) of all pixel gray values in its neighborhood as the local brightness reference benchmark of the pixel, so as to obtain the local mean image Image conv_gray If the pixel point is located at the boundary, all the pixels outside the boundary are filled with the nearest boundary pixel value. Specifically, the calculation method of I conv (x,y) is as follows:

[0243]

[0244] Step S54 determine contrast nonlinear enhancement parameters: first, calculate the standard deviation σ conv_gray of the local mean image Image conv obtained by the S53, which represents the local contrast of the image. Then according to σconv The value range of determines the contrast nonlinear enhancement parameter R, and realizes dynamic correspondence between the contrast enhancement intensity and the characteristics of the image itself. Specifically, σ conv The calculation steps of and R are as follows:

[0245] (1) Global mean μ conv Calculation:

[0246]

[0247] Wherein, H2, W2 are the height and width of the local mean image Image conv_gray obtained by S53 respectively.

[0248] (2) Standard deviation σ conv Calculation:

[0249]

[0250] (3) Nonlinear contrast enhancement parameter R calculation:

[0251]

[0252] Preferably, R min = 1, R max = 3, σ min_1 = 3, σ max_1 = 10.

[0253] Step S55 pixel-level contrast nonlinear enhancement: for each pixel point of the low-resolution gray image obtained by S3, first obtain its normalized gray value I n (x, y) based on S41, based on S53 local brightness reference I conv (x, y), and the contrast nonlinear enhancement parameter R determined based on S54, calculate the exponential enhancement factor U(x, y) of the pixel contrast. Then, the exponential enhancement factor is used to perform power transformation on the normalized gray value after the brightness enhancement of S4, and finally the enhanced output value S(x, y) of the pixel is obtained, so as to realize nonlinear contrast enhancement on the brightness enhanced image, and obtain the contrast enhanced image Image ace_gray . Specifically, the steps of calculating U(x, y) and S(x, y) are as follows:

[0254] (1) Calculate the exponential enhancement factor U(x, y):

[0255]

[0256] (2) Calculate the pixel enhancement value S(x, y):

[0257]

[0258] Specifically, to keep the example consistent, the 4x4 low resolution gray scale image used is exactly the same as the one exemplified in step S41, with the pixel gray scale values as in Table 4 above:

[0259] Table 4 Gray scale value table of the gray scale image exemplified in the image brightness enhancement operation

[0260]

[0261] (1) Laplacian operator definition:

[0262] The standard two-dimensional Laplacian operator is used:

[0263]

[0264] (2) Image convolution:

[0265] For each pixel, perform two-dimensional convolution with K (boundary pixels are copied with boundaries)

[0266] L(x,y) = K * I down_scale_gray (x,y)

[0267] Taking the center pixel I n (1,1) as an example, the convolution process is calculated as follows:

[0268] L(1,1) = 0x30 + 1x40 + 0x70 + 1x35 + (-4) x 50 + 1x80 + 0x50 + 1x70 + 0x100

[0269] The calculation gives: L(1,1) = 25

[0270] According to the calculation process steps of L(1,1), other pixel points can be solved to obtain the gray scale value after the image convolution operation:

[0271] L(0,0) = 15, L(1,0) = 30, L(2,0) = 0, L(3,0) = -10,

[0272] L(0,1) = 25, L(1,1) = 25, L(2,1) = 0, L(3,1) = -10

[0273] L(0,2) = 25, L(1,2) = 10, L(2,2) = -20, L(3,2) = -20,

[0274] L(0,3) = 0, L(1,3) = -20, L(2,3) = 0, L(3,3) = -50

[0275] (3) Absolute value processing:

[0276] L abs(x, y) = |L(x, y)|

[0277] So the Laplacian convolution absolute value of the whole image is obtained, as shown in Table 6 below:

[0278] Table 6 Laplacian convolution absolute value table

[0279]

[0280] (4) Calculate the mean value Q of the Laplacian response of the whole image:

[0281]

[0282] (5) Determine the box filter parameter:

[0283] If the parameter c is too large, the filter window will completely cover the whole image, and the final result will become "global mean value". Therefore, for the 4x4 small image in the example, setting c = 1 can better reflect the local characteristics.

[0284] (6) Establish a local brightness reference benchmark:

[0285] According to the box filter parameter c determined in S52, the low-resolution gray image Image down_scale_gray obtained in S3 is subjected to a box filter operation. Taking each pixel point Image down_scale_gray (x, y) as the center, the average value of all pixel gray values in its neighborhood is calculated as the local brightness reference benchmark I conv (x, y) of the pixel, thereby obtaining the local mean value image Image conv_gray . Specifically, I conv (x, y) is calculated as follows:

[0286]

[0287] Substitute c = 1:

[0288]

[0289] Taking pixel point Image conv_gray (1, 1) as an example, its neighborhood is a 3x3 region of pixel points (0, 0) to (2, 2), so:

[0290]

[0291] According to the calculation process steps of I conv (1, 1), substitute other pixel points to solve the gray value (rounded to an integer) of the whole local mean value image Image conv_gray , as shown in Table 7 below:

[0292] Table 7 Local mean image gray value table

[0293]

[0294] (6) Determine the contrast nonlinear enhancement parameter:

[0295] First, the S53 obtained local mean image Image conv_gray standard deviation σ conv , representing the local contrast of the image. Then according to the value range of σ conv determine the contrast nonlinear enhancement parameter R, realize the dynamic corresponding of contrast enhancement intensity and image itself characteristics. Specifically, the calculation steps of σ conv and R are as follows:

[0296] 1, calculate the global mean μ conv :

[0297]

[0298] 2, calculate the standard deviation σ conv :

[0299]

[0300] Substitute the relevant numerical values, σ conv = 24.7

[0301] 3, nonlinear contrast enhancement parameter R calculation:

[0302]

[0303] Preferably, R min = 1, R max = 3, σ min_1 = 3, σ max_1 = 10.

[0304]

[0305] Therefore, σ conv = 24.7 > 10, R = 1.

[0306] (7) Pixel-level contrast nonlinear enhancement:

[0307] 1, get the relevant parameters

[0308] According to the above calculation process can be obtained from the table 4, table 5, table 7 data:

[0309] Low-resolution gray image Image down_scale_gray gray value I conv (x,y):

[0310] Table 4: Gray value table of the gray image

[0311]

[0312] Image down_scale_gray Image after brightness enhancement ale_gray Normalized gray value I' n (x1,y1):

[0313] Table 5: Normalized gray value table of the image after brightness enhancement

[0314]

[0315] Image down_scale_gray Local mean image Image after box filter processing conv_gray Gray value I conv (x,y):

[0316] Table 7: Gray value table of the local mean image

[0317]

[0318]

[0319] Nonlinear contrast enhancement parameter: R = 1.

[0320] 2. Calculate the contrast enhancement factor U(x,y):

[0321]

[0322] According to the parameters calculated above, take the pixel point (0,0) as an example:

[0323]

[0324] According to the calculation process steps of U(0,0), the exponential enhancement factor U(x1,y1) of the entire image can be solved by substituting the data of other pixel points, as shown in the following Table 8:

[0325] Table 8: Contrast enhancement exponential enhancement factor table of the image

[0326]

[0327] 3. Calculate the gray value after contrast enhancement:

[0328] S(x,y) = 255·[I' n (x,y)] U(x,y)

[0329] Take the pixel (0,0) as an example:

[0330] S(0,0)=255×[I' n (0,0)] U(0,0) =255×[I' n (0,0)] U(0,0) =255×[0.37] 1.2 =77

[0331] According to the calculation process steps of S(0,0), substituting the data of other pixels, the enhanced grayscale value of the entire image (rounded off) can be solved, as shown in Table 9 below:

[0332] Table 9 Grayscale value table after final enhancement of the image

[0333]

[0334]

[0335] Step S6: Image resolution restoration: Use bilinear interpolation algorithm to upsample the low-resolution image after contrast enhancement in S5 to the resolution of the original input color image in S1 to obtain the image with restored resolution. up_scale_gray ;

[0336] In this example, it is assumed that the downsampling ratio of the image is scale = 1 (that is, no actual downsampling is performed), so the resolution after enhancement is completely consistent with the original color image, and no resolution recovery operation is required to obtain the image with the restored resolution Image up_scale_gray .

[0337] Step S7: Image color restoration: The image whose resolution has been restored in S6 is restored using an adaptive weighted fusion method to restore its color. By analyzing the image features and dynamically adjusting the fusion weights, the relationship between the red, green, and blue color channel components of the original image at each pixel position and the enhanced grayscale value is weightedly fused to restore the pixel value of each color channel and achieve natural and accurate color restoration.

[0338] Specific steps:

[0339] Step S71 determines the weighted fusion coefficient: First, based on the image Image restored after the S6 resolution up_scale_gray The pixel standard deviation σ G , according to σ G The weighting coefficient α is determined by adaptively adjusting the value range of . Specifically, the steps for calculating α are as follows:

[0340] (1) Calculate the standard deviation u G :

[0341]

[0342] wherein H3, W3 are the height and width of the image Image up_scale_gray G(x, y): represents the gray value of the image at pixel point (x, y) after the resolution is enhanced and restored;

[0343] (2) Standard deviation σ G Calculation:

[0344]

[0345] (3) Linear interpolation adjustment weighting coefficient a:

[0346] According to the standard deviation σ G , the weighting coefficient a is adaptively determined by linear interpolation, specifically as follows:

[0347] Preferably, a min = 0.85, a max = 0.95, σ min = 3, σ max = 10.

[0348] Step S72 color weighted fusion recovery:

[0349] Based on the weighting fusion coefficient a determined in the S71, for each pixel point, the color channel information of the input original color image and the brightness information of the enhanced gray image are weighted to reconstruct the color. Specifically, by weighting the relationship between the red, green and blue color channel components of the original image at the pixel position and the enhanced gray value, the pixel value of each color channel is recovered. This process can be represented by the following formula:

[0350]

[0351] wherein I enhance,j (x, y): represents the pixel value of the jth color channel in the color recovery process of the enhanced image at pixel point (x, y), j ∈ {1, 2, 3}, corresponding to the red (R), green (G) and blue (B) channels. G(x, y): represents the gray value of the image at pixel point (x, y) after the resolution is enhanced and restored. I original,j (x, y): represents the pixel value of the jth color channel of the input original color image at pixel point (x, y), j ∈ {1, 2, 3}, corresponding to the red (R), green (G) and blue (B) channels. I original_gray(x, y): represents the gray value of the original color image at pixel point (x, y). ∈ is a small constant introduced to prevent the denominator from being zero, preferably, ∈ = 0.000001.

[0352] Specifically, the image Image up_scale_gray whose pixel matrix is 4x4, and the pixel value G(x, y) is shown in Table 10 as follows:

[0353] Table 10 Gray value table of the image whose resolution is restored

[0354]

[0355] Suppose the R, G, B values of each pixel point in the original color image Image original in S1 are respectively:

[0356] The value of the R component of the pixel point is shown in Table 11 as follows:

[0357] Table 11 R component table of the pixel point of the original color image

[0358]

[0359] The value of the G component of the pixel point is shown in Table 12 as follows:

[0360] Table 12 G component table of the pixel point of the original color image

[0361]

[0362] The value of the B component of the pixel point is shown in Table 13 as follows:

[0363] Table 13 B component table of the pixel point of the original color image

[0364]

[0365] (1) Calculate the mean value u G :

[0366]

[0367] (2) Calculate the standard deviation σ G :

[0368]

[0369] Substitute the numerical value to solve σ G = 27.63

[0370] (3) Determine the color weighted fusion parameter α

[0371]

[0372] Preferably, α min =0.85,α max =0.95,σ min_2 =3,σ max_2 =10.

[0373] According to σ G =27.63>10, so α=0.85

[0374] (4) Color weighted fusion restoration:

[0375]

[0376] Image in pixels up_scale_gray Take (0,0) as an example, the enhanced grayscale value is G(0,0)=77, and the component values ​​of its R, G, and B channels are calculated (rounded off):

[0377] Pixel I up_scale_gray The component value of (0,0) in the R (red) channel:

[0378]

[0379] Pixel I up_scale_gray The component value of (0,0) in the G (green) channel:

[0380]

[0381] Pixel I up_scale_gray The component value of (0,0) in the B (blue) channel:

[0382]

[0383] like Figure 1 As shown, an embodiment of the present invention further provides an adaptive nonlinear image enhancement system for low-light scenes on mobile terminals, comprising:

[0384] The conversion module is used to convert the input color image from RGB space to grayscale space and generate a grayscale image using the weighted average method;

[0385] a noise reduction module, configured to calculate a local variance based on the obtained grayscale image to evaluate a noise level, and perform a median filtering noise reduction process on the grayscale image when the local variance exceeds a set threshold;

[0386] The analysis module is used to downsample the grayscale image after noise reduction. By dynamically analyzing the image size, grayscale standard deviation and edge density characteristics, it adaptively determines the final downsampling ratio and generates a low-resolution grayscale image.

[0387] The enhancement module is used for adopting Otsu method to calculate a global brightness segmentation threshold for the obtained low-resolution gray image, constructing a non-linear brightness enhancement function based on the threshold, and realizing pixel-level brightness adaptive enhancement through a pre-generated lookup table;

[0388] The transformation module is used for calculating a global Laplace response mean based on the obtained low-resolution gray image, adaptively determining a box filter window size and calculating a local mean image; dynamically adjusting a non-linear enhancement parameter based on a standard deviation of the local mean image, calculating an exponential enhancement factor in combination with a normalized gray value and a local brightness reference benchmark; and performing pixel-level power transformation on the brightness-enhanced image by using the exponential enhancement factor, so as to realize non-linear contrast enhancement.

[0389] The processing module is used for adopting bilinear interpolation up-sampling to the original input resolution for the contrast-enhanced image; and fusing each color channel component of the original color image with the enhanced gray value by using an adaptive weighted fusion method for the image with restored resolution, so as to realize color restoration and output an enhanced color image subjected to adaptive brightness enhancement, contrast enhancement and color restoration.

[0390] It should be noted that the system corresponds to the above method, and all implementation manners in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.

[0391] Embodiments of the present application also provide a computing device, comprising a processor and a memory storing a computer program, wherein the computer program is executed by the processor to perform the above method. All implementation manners in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.

[0392] Embodiments of the present application also provide a computer readable storage medium storing instructions, wherein the instructions are executed on a computer to make the computer perform the above method. All implementation manners in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.

[0393] The above is the preferred embodiment of the present application, and it should be noted that, for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should also be considered as the protection scope of the present application.

Claims

1. An adaptive nonlinear image enhancement method for low-light scenes on mobile terminals, characterized by: The method comprises the following steps: Step S1: convert the input color image from RGB space to grayscale space, and generate a grayscale image using weighted average method; Step S2: Calculating the local variance based on the grayscale image obtained in step S1 to evaluate the noise level, and performing median filtering noise reduction processing on the grayscale image when the local variance exceeds a set threshold; Step S3: downsampling the grayscale image after the noise reduction process in step S2, adaptively determining the final downsampling ratio by dynamically analyzing the image size, grayscale standard deviation and edge density characteristics, and generating a low-resolution grayscale image; Step S4: using the Otsu method to calculate the global brightness segmentation threshold for the low-resolution grayscale image obtained in step S3, constructing a nonlinear brightness enhancement function based on the threshold, and implementing pixel-level brightness adaptive enhancement through a pre-generated lookup table; Step S5: calculating the global Laplace response mean based on the low-resolution grayscale image obtained in step S3, adaptively determining the box filter window size and calculating the local mean image; dynamically adjusting the nonlinear enhancement parameters based on the standard deviation of the local mean image, and calculating the exponential enhancement factor in combination with the normalized grayscale value and the local brightness reference; and performing a pixel-level power transformation on the brightness-enhanced image in step S4 using the exponential enhancement factor to achieve nonlinear contrast enhancement; Step S6: upsampling the image after contrast enhancement in step S5 to the original input resolution using bilinear interpolation; Step S7: for the image after the resolution is restored in step S6, each color channel component of the original color image is fused with the enhanced grayscale value by an adaptive weighted fusion method to achieve color restoration; Step S8: Outputting the enhanced color image after adaptive brightness enhancement, contrast enhancement and color restoration processing.

2. The adaptive nonlinear image enhancement method for low-light scenes on mobile terminals according to claim 1, characterized in that: The step S1 comprises: Step S11: extracting the red component, green component and blue component of each pixel in the input original color image; Step S12: For each pixel, the red component, green component and blue component are weighted averaged according to the brightness sensitivity distribution weights, where the red component weight is 0.299, the green component weight is 0.587, and the blue component weight is 0.114, to generate a single-channel grayscale image.

3. The adaptive nonlinear image enhancement method for low-light scenes on mobile terminals according to claim 2, characterized in that: The step S2 comprises: Step S21: for each pixel in the single-channel grayscale image generated in step S12, calculating the variance of the grayscale values ​​of all pixels in a square neighborhood window centered on the pixel as the local variance; Step S22: Compare the local variance of each pixel with a preset noise threshold, and mark the pixel as requiring noise reduction when the local variance is greater than the threshold; Step S23: For the pixel point marked as requiring denoising, the median of the grayscale values ​​of all pixels in its neighborhood window is obtained to replace the original grayscale value, thereby generating a grayscale image after denoising.

4. The adaptive nonlinear image enhancement method for low-light scenes on mobile terminals according to claim 3, characterized in that: The step S3 comprises: Step S31: performing the following feature parameter extraction on the denoised grayscale image generated in step S23: Calculate the deviation statistics of the grayscale values ​​of all pixels from the average value as the grayscale standard deviation; obtain a binary edge map through the edge detection algorithm, count the number of edge pixels and calculate the edge density; obtain the preset target resolution parameters; Step S32: Based on the grayscale standard deviation, edge density and target resolution, dynamically calculate the downsampling ratio through a nonlinear function relationship, wherein the calculation process satisfies: The scale value increases with the grayscale standard deviation and edge density. The upper limit of the scale value is 1.

0. The ratio of the target resolution to the maximum size of the image is used as the basic scaling factor. Step S33: scaling the denoised grayscale image according to the calculated ratio to generate a low-resolution grayscale image.

5. The adaptive nonlinear image enhancement method for low-light scenes on mobile terminals according to claim 4, characterized in that: Step S41: normalizing the grayscale value of each pixel in the low-resolution grayscale image generated in step S33 and mapping it to the interval [0, 1]; Step S42: traverse all gray levels based on the Otsu method and determine the global brightness segmentation point by maximizing the inter-class variance; Step S43: Calculate the nonlinear enhancement parameter Z in segments according to the position of the brightness segmentation point in the preset target interval, where: When the segmentation point is below the minimum target threshold, Z is 0; when the segmentation point is above the maximum target threshold, Z is 1; when the segmentation point is within the target threshold interval, Z is mapped in a linear scale; Step S44: construct a combined nonlinear enhancement function based on the parameter Z, and perform three operations on each normalized pixel value simultaneously: The first term is the grayscale value's (0.75×Z+0.25) power transformation; the second term is the weighted calculation of the inverse grayscale value and (1-Z); the third term is the grayscale value's (2-Z) power transformation; the results of the three operations are weighted averaged to output the enhanced normalized grayscale value; Step S45: For the integer grayscale value range of 0-255, pre-calculate and store the output value of the function in step S44 to build a lookup table; when processing the image, directly use the pixel value to index the lookup table to obtain the enhancement result.

6. The adaptive nonlinear image enhancement method for low-light scenes on mobile terminals according to claim 5, characterized in that: The step S5 comprises: Step S51: Based on the low-resolution grayscale image obtained in step S3, the texture response value of each pixel is calculated by Laplacian operator convolution, and the absolute value is taken and the average value of the entire image is calculated as the global contrast feature value Q; Step S52: Adaptively determine the box filter window size parameter c using a segmented interpolation strategy based on the value range of the global contrast feature Q, where: When Q is less than or equal to the minimum threshold, c takes the maximum value; when Q is greater than or equal to the maximum threshold, c takes the minimum value; when Q is within the threshold range, c decreases linearly with the increase of Q; Step S53: performing neighborhood mean calculation on the low-resolution grayscale image according to the window size c to generate a local brightness reference image for each pixel; Step S54: Calculate the standard deviation of the local brightness reference image, and determine the nonlinear contrast enhancement parameter R in sections according to the value range of the standard deviation, where: When the standard deviation is less than or equal to the lower limit, R takes the maximum value; when the standard deviation is greater than or equal to the upper limit, R takes the minimum value; when the standard deviation is within the interval, R decreases linearly with the increase of the standard deviation; Step S55: For each pixel, perform: Calculate the exponential enhancement factor based on its normalized grayscale value, local brightness reference value and parameter R; The normalized enhanced grayscale value outputted in step S44 is subjected to a power transformation using the exponential enhancement factor; the transformation result is mapped back to the standard grayscale value domain to generate a contrast-enhanced image.

7. The adaptive nonlinear image enhancement method for low-light scenes on mobile terminals according to claim 6, characterized in that: The S6 image resolution restoration includes the following steps: using a bilinear interpolation algorithm to upsample the low-resolution image after S5 contrast enhancement, and increasing its resolution to be consistent with the original input image to obtain a restored image.

8. The adaptive nonlinear image enhancement method for low-light scenes on mobile terminals according to claim 7, characterized in that: The step S7 comprises: Step S71: Calculate the overall grayscale standard deviation of the image after resolution restoration output in step S6, and adaptively determine the weighting coefficient α using a piecewise linear interpolation strategy based on the range of the standard deviation, where: When the standard deviation is less than or equal to the lower threshold, α takes the maximum value; When the standard deviation is greater than or equal to the upper threshold, α takes the minimum value; When the standard deviation is within the threshold interval, α decreases linearly with the increase of the standard deviation; Step S72: Perform a channel-by-channel color restoration operation on each pixel: Based on the proportional relationship between the red, green, and blue channel component values ​​and the original grayscale value at the pixel position of the original input color image; multiplying the proportional relationship with the enhanced grayscale value output in step S6 as the first weighted item; directly using the enhanced grayscale value output in step S6 as the second weighted item; fusing the first weighted item and the second weighted item according to the weighting coefficient α, and outputting the final color channel value.

9. An adaptive nonlinear image enhancement system for low-light scenes on mobile terminals, characterized by: The system is used to perform the method according to any one of claims 1 to 8, comprising: The conversion module is used to convert the input color image from RGB space to grayscale space and generate a grayscale image using the weighted average method; a noise reduction module, configured to calculate a local variance based on the obtained grayscale image to evaluate a noise level, and perform a median filtering noise reduction process on the grayscale image when the local variance exceeds a set threshold; The analysis module is used to downsample the grayscale image after noise reduction. By dynamically analyzing the image size, grayscale standard deviation and edge density characteristics, it adaptively determines the final downsampling ratio and generates a low-resolution grayscale image. An enhancement module is used to calculate the global brightness segmentation threshold of the obtained low-resolution grayscale image using the Otsu method, construct a nonlinear brightness enhancement function based on the threshold, and realize pixel-level brightness adaptive enhancement through a pre-generated lookup table; A transformation module is configured to calculate a global Laplace response mean based on the obtained low-resolution grayscale image, adaptively determine the box filter window size, and calculate a local mean image; dynamically adjust nonlinear enhancement parameters based on the standard deviation of the local mean image, and calculate an exponential enhancement factor based on the normalized grayscale value and a local brightness reference; and perform a pixel-level power transformation on the brightness-enhanced image using the exponential enhancement factor to achieve nonlinear contrast enhancement. The processing module is used to upsample the contrast-enhanced image to the original input resolution using bilinear interpolation; for the image after the resolution is restored, the color channel components of the original color image are fused with the enhanced grayscale value through an adaptive weighted fusion method to achieve color restoration, and output an enhanced color image that has undergone adaptive brightness enhancement, contrast enhancement and color restoration processing.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a program, which, when executed by a processor, implements the method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Image enhancement method and device based on camera response function nonlinear information color blocks

    CN120833285A

  • Image enhancement method and device based on camera response function nonlinear information color block

    CN120833285B

  • Infrared image enhancement method and system based on local phase correlation

    CN120997061A

  • Infrared image enhancement method and system based on local phase correlation

    CN120997061B

  • Self-adaptive image enhancement method and device in low-illumination scene

    CN121304516A