Image enhancement filtering method based on simple function construction under weak light and near-infrared light conditions
Through the image enhancement filtering method based on atanh and sech functions, the image quality problems in low-light, near-infrared light and underwater imaging are solved, and the contrast and details are improved, while suppressing noise, strong adaptability and high computing efficiency.
Patent Information
- Application Number
- CN202510310081.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-07-04
AI Technical Summary
Image quality is significantly affected under low-light, near-infrared light and underwater imaging conditions. Traditional image enhancement technologies are difficult to effectively improve contrast and details, while amplifying noise, especially in high-deep waters, which are difficult to restore image resolution and edge details.
The image enhancement filtering method based on the atanh function and the sech function is adopted, and the low-frequency approximation coefficient is extracted through wavelet transformation decomposition, combined with convolution operation and iterative optimization, the size of the convolution kernel is adjusted, image gradient calculation is performed, and enhanced images are output.
Effectively improve image contrast and detail, suppress noise, improve image quality, and adapt to various image processing tasks, especially in low-light, near-infrared and underwater imaging environments.
Smart Images

Figure CN120259121A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image enhancement, and particularly relates to an image enhancement filtering method based on a simple function under low light and near-infrared light conditions. Background Art
[0002] Image enhancement technology plays a crucial role in the field of image processing. By improving the contrast, brightness, and detail performance of images, image enhancement can effectively improve image quality, making details clearer and edges sharper, thereby enhancing the accuracy of subsequent image analysis and processing. Especially in the fields of medical imaging, remote sensing monitoring, industrial inspection, and machine vision, the enhancement of clarity and details not only improves the visibility of images but also provides more accurate information for data interpretation, contributing to more precise diagnosis, decision-making, and automated processing.
[0003] In specific application scenarios such as low light environments, near-infrared imaging, and underwater imaging, image quality is often significantly affected, and traditional image enhancement technologies are difficult to effectively solve these problems. Under low light conditions, due to insufficient light sources, images usually exhibit low contrast and detail loss, accompanied by a high noise level. Conventional enhancement methods may amplify noise while increasing brightness, further degrading image quality. Near-infrared imaging is widely used in biomedical, night monitoring, and environmental monitoring fields. However, due to the scattering and low reflection characteristics of near-infrared light, images often have low contrast, blurred edges, and background noise. Especially in low light environments, the loss of detail information seriously affects the recognition and positioning of targets. Underwater imaging faces more complex challenges. The light propagation in the underwater environment is affected by water quality, suspended particles, and underwater objects, resulting in a significant decrease in image contrast and loss of details. Conventional image processing methods are difficult to effectively restore image quality. Especially in high-depth waters, it is difficult to restore image resolution and edge details. Summary of the Invention
[0004] Object of the Invention: To solve the image quality problems under low light and near-infrared light conditions, an image enhancement filtering method based on a simple function under low light and near-infrared light conditions is provided.
[0005] Technical Solution: To achieve the above object, the present invention provides an image enhancement filtering method based on a simple function under low light and near-infrared light conditions, including the following steps:
[0006] S1: Obtain an image under low light or near-infrared light conditions;
[0007] S2: Preprocess the image obtained in step S1;
[0008] S3: Extract low-frequency approximation coefficients from the preprocessed image through wavelet transform decomposition;
[0009] S4: Construct an image enhancement filtering module based on the atanh function and the sech function, and perform a mathematical transformation on the low-frequency approximation coefficients;
[0010] S5: According to the low-frequency approximation coefficients after the mathematical transformation, calculate the image gradient using convolution operation; adjust the size of the convolution kernel and iteratively optimize the image; output the enhanced image after processing.
[0011] Further, the preprocessing in step S2 includes grayscale conversion and double-precision storage.
[0012] Grayscale conversion: Process independent pixel points, and visually improve the image by changing the grayscale range occupied by the original image data;
[0013] Double-precision storage: For a 64-bit floating-point number, the highest 1 bit is the sign bit S, the following 11 bits are the exponent E, and the remaining 52 bits are the significant digits M. The storage in memory is implemented according to the IEEE754 standard.
[0014] Further, the image enhancement filtering module in step S4 includes an image enhancement filtering algorithm part based on the atanh function and an image enhancement filtering algorithm part based on the sech function. The present invention is based on the combination of simple functions and general functions, and enhances images composed of signals with different frequencies through special functions. Two algorithms are defined using the hyperbolic functions atanh function and sech function respectively, forming an atanh filter and a sech filter. The atanh filter and the sech filter in the present invention exist in parallel and operate independently, and can be selected according to specific conditions and requirements.
[0015] Further, the image enhancement filtering algorithm based on the atanh function in step S4 performs a mathematical transformation on the low-frequency approximation coefficients, specifically including:
[0016] A1: Read an image in JPG format and convert it into a grayscale image;
[0017] A2: Perform wavelet transform processing on the input grayscale image, decompose it into approximation coefficients and detail coefficients, and the approximation coefficients of the low-frequency part are represented as u;
[0018] A3: Perform a mathematical transformation on the approximation coefficients u of the low-frequency part to enhance the image contrast and suppress noise.
[0019] Further, step A3 specifically includes
[0020] r = log(u)
[0021] r1 = c1*(csch(r))*log(r)+c2*(csch(c3*r))*log(c4*r)+c5*csch(c6*r)*log(c7*r)
[0022] r2 = log(r)
[0023] r3 = atanh((c8*sinh(r2 + c9) / r2)
[0024] r4 = r3 n
[0025] Wherein, c1, c2, c3, c4, c5, c6, c7, c8, c9, n are constants.
[0026] Further, the step S5 specifically includes:
[0027] B1: Define the image size as [N, M], define the convolution kernel matrices h = [a1, a2, a3, a4], g = [a5, a6], define the difference matrix delta = [a7, a8, a9], and perform the following operations:
[0028] a(1:N, 1:M, 1:a 10 +1) = 0
[0029] dx(1:N, 1:M, 1:a 10 +1) = 0
[0030] dy(1:N, 1:M, 1:a 10 +1) = 0
[0031] d(1:N, 1:M, 1:a 10 +1) = 0
[0032] B2: Calculate the gradient of the image through convolution operation to obtain dx and dy:
[0033] a(:, :, 1) = conv(h, h, u)
[0034] dx(:, :, 1) = conv(delta, g, u)
[0035] dy(:, :, 1) = conv(g, delta, u)
[0036] Calculate the gradient information of the image through the convolution kernel:
[0037] x = dx(:, :, 1)
[0038] y = dy(:, :, 1)
[0039]
[0040] wherein, a1, a2, a3, a4, a5, a6, a7, a8, a9, and a 10 are all constants; the symbol "conv" refers to the calculation carrying out convolution;
[0041] B3: Adjust the size of the convolution kernel and perform convolution operations to optimize the image. Set the size lh and lg of the convolution kernel, and update the size of the convolution kernel through the following formula:
[0042] lhj = 2^j * (lh - 1) + 1
[0043] lgj = 2^j * (lg - 1) + 1
[0044] For each iteration, calculate the convolution operation between the convolution kernel and the image, and gradually adjust the size of the convolution kernel and the image processing process:
[0045] hj(1:lhj) = 0
[0046] gj(1:lgj) = 0
[0047] Update the weight of the convolution kernel through each iteration:
[0048] a(:,:,j + 1) = conv(hj, hj, a(:,:,j))a(:,:,j + 1)
[0049] dx(:,:,j + 1) = conv(δ, gj, a(:,:,j))dx(:,:,j + 1)
[0050] dy(:,:,j + 1) = conv(gj, δ, a(:,:,j))dy(:,:,j + 1)
[0051] Update x = dx(:,:,j + 1), y = dy(:,:,j + 1), and repeat the iteration until the final enhanced image is obtained;
[0052] B3: Output the final enhanced image.
[0053] Furthermore, the image enhancement filtering algorithm based on the sech function in step S4 performs mathematical transformation on the low-frequency approximation coefficients, specifically including:
[0054] C1: Read an image in JPG format and convert it into a grayscale image;
[0055] C2: Perform wavelet transform processing on the input grayscale image, decompose it into approximation coefficients and detail coefficients, and the approximation coefficient of the low-frequency part is denoted as u2;
[0056] C3: Perform a mathematical transformation on the approximation coefficient u2 of the low-frequency part to enhance image contrast and suppress noise.
[0057] Further, the step C3 specifically includes:
[0058] u3 = d1 * sech(d2 * u2)
[0059] u4 = log(u3)
[0060] u5 = u4 m
[0061] where d1, d2, and m are constants.
[0062] Further, the step S5 specifically includes:
[0063] D1: Perform an inverse wavelet transform on the enhanced coefficient u5 to obtain the enhanced image u6, whose size is defined as [N1, M1]. Define the convolution kernel matrix h = [0.15, 0.175, 0.175, 0.125], g = [0.5, -0.5], define the difference matrix delta = [1, 0, 0], and perform the following operations:
[0064] a1(1:N1, 1:M1, 1:J+1) = 0
[0065] dx1(1:N1, 1:M1, 1:J+1) = 0
[0066] dy1(1:N1, 1:M1, 1:J+1) = 0
[0067] d1(1:N1, 1:M1, 1:J+1) = 0
[0068] Calculate the gradient of the image through convolution operations to obtain dx and dy:
[0069] a1(:, :, 1) = conv(h1, h1, u6)
[0070] dx1(:, :, 1) = conv(delta1, g1, u6)
[0071] dy1(:, :, 1) = conv(g1, delta1, u6)
[0072] Calculate the gradient information of the image through the convolution kernel:
[0073] x1 = dx1(:, :, 1);
[0074] y1 = dy1(:, :, 1);
[0075]
[0076] D2: Optimize the image by adjusting the size of the convolutional kernel and performing convolutional operations. Set the sizes of convolutional kernels h1 and g1 to lh2 and lg2 respectively, and update the size of the convolutional kernel through the following formula:
[0077] lhj2 = 2^j2 * (lh2 - 1) + 1
[0078] lgj2 = 2^j2 * (lg2 - 1) + 1
[0079] For each iteration, calculate the convolutional operation between the convolutional kernel and the image, and gradually adjust the size of the convolutional kernel and the image processing process:
[0080] hj2(1:lhj2) = 0
[0081] gj2(1:lgj2) = 0
[0082] Update the weight of the convolutional kernel through each iteration:
[0083] a2(:,:,j2 + 1) = conv(hj2, hj2, a2(:,:,j2))
[0084] dx2(:,:,j2 + 1) = conv(delta2, gj2, a2(:,:,j2))
[0085] dy2(:,:,j2 + 1) = conv(gj2, delta2, a2(:,:,j2))
[0086] Update x2 = dx2(:,:,j2 + 1); y2 = dy2(:,:,j2 + 1), and repeat the iteration until the final enhanced image is obtained;
[0087] D3: Output the final enhanced image.
[0088] Beneficial effects: Compared with the prior art, the present invention has the following advantages:
[0089] 1. Different from traditional image enhancement methods (such as histogram equalization, Retinex theory, etc.), the filter based on simple mathematical functions provided by the present invention can effectively suppress noise while enhancing image contrast and details. In many traditional methods, especially in low-light environments, the improvement of image details is often accompanied by the amplification of noise. Through low-pass filtering of the low-frequency part and non-linear transformations (such as logarithmic transformation and inverse hyperbolic tangent transformation), this filter can effectively reduce the problem of noise amplification, making the image enhancement effect clearer and more stable.
[0090] 2. Compared with complex deep learning methods, the image enhancement filter based on simple mathematical functions enhances images by directly performing mathematical transformations on the images, without relying on large training data sets and model calculations. Therefore, this method has high computational efficiency and can adjust corresponding parameters according to different application scenarios, making it highly adaptable in various image processing tasks.
[0091] 3. Since this filter has particularly good effects in enhancing images in complex environments such as low contrast, low light, and near-infrared and underwater imaging, it can effectively handle image quality problems that are difficult to deal with by traditional methods. For example, in underwater imaging, due to the absorption and scattering effects of water, images often lack sufficient contrast and details. The filter based on simple mathematical functions can effectively enhance the details and contrast of these images, suppress noise, and thus improve the visibility of the target. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] Figure 1 It is a schematic flowchart of the method of the present invention;
[0093] Figure 2 It is a comparison diagram of processing images obtained under low light conditions provided in Example 1;
[0094] Figure 3 It is a comparison diagram of processing images obtained under near-infrared light conditions provided in Example 2;
[0095] Figure 4 It is a comparison diagram of the application effect of underwater image contour extraction provided in Example 3;
[0096] Figure 5 It is a comparison diagram of the application effect of image fusion provided in Example 4;
[0097] Figure 6 It is a comparison diagram of the application effect of image edge detection provided in Example 5;
[0098] Figure 7 It is a comparison diagram of the application effect of image array detection provided in Example 6. DETAILED DESCRIPTION OF THE INVENTION
[0099] The present invention will be further clarified below with reference to the drawings and specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and not to limit the scope of the present invention. After reading the present invention, various equivalent forms of modification of the present invention by those skilled in the art all fall within the scope defined by the appended claims of this application.
[0100] Example 1:
[0101] As Figure 1As shown in the figure, this embodiment provides an image enhancement filtering method based on a simple function under low light and near-infrared light conditions, including the following steps:
[0102] S1: Obtain an image under low light conditions;
[0103] Low light conditions refer to the light intensity distortion caused by low light and unbalanced light, and sometimes include dust, haze, etc. around the target object.
[0104] S2: Preprocess the image obtained in step S1, including grayscale conversion and double-precision storage:
[0105] Grayscale conversion: Process independent pixel points, and visually improve the image by changing the grayscale range occupied by the original image data; the purpose of grayscale conversion is to improve the image quality and make the display effect of the image clearer.
[0106] Double-precision storage: For 64-bit floating-point numbers, the highest 1 bit is the sign bit S, the next 11 bits are the exponent E, and the remaining 52 bits are the significant digits M. The storage in memory is implemented according to the IEEE 754 standard. Generally, pictures are stored in uint8 data. When performing data operations on pictures, data overflow occurs when the data is greater than 256, and the result is distorted. However, no overflow occurs during double-precision number operations. Therefore, converting uint8 data to double-precision numbers first will not distort the calculation accuracy.
[0107] S3: Extract the low-frequency approximation coefficients from the preprocessed image through wavelet transform decomposition;
[0108] S4: Construct an image enhancement filtering module based on the atanh function and the sech function;
[0109] In this embodiment, an image enhancement filtering algorithm based on the atanh function is used to perform a mathematical transformation on the low-frequency approximation coefficients, specifically including:
[0110] A1: Read an image in JPG format and convert it into a grayscale image;
[0111] A2: Perform wavelet transform processing on the input grayscale image, decompose it into approximation coefficients and detail coefficients, and the approximation coefficients in the low-frequency part are denoted as u;
[0112] A3: Perform a mathematical transformation on the approximation coefficients u in the low-frequency part to enhance the image contrast and suppress noise; specifically including:
[0113] r = log(u)
[0114] r1 = c1*(csch(r))*log(r)+c2*(csch(c3*r))*log(c4*r)+c5*csch(c6*r)*log(c7*r)
[0115] r2 = log(r)
[0116] r3 = atanh((c8*sinh(r2 + c9) / r2)
[0117] r4 = r3 n
[0118] Wherein, c1, c2, c3, c4, c5, c6, c7, c8, c9, and n are constants.
[0119] S5: Calculate the image gradient using convolution operation according to the low-frequency approximation coefficients after mathematical transformation; adjust the convolution kernel size and iteratively optimize the image; output the enhanced image after processing;
[0120] Step S5 specifically includes:
[0121] B1: Define the image size as [N, M], define the convolution kernel matrix h = [a1, a2, a3, a4], g = [a5, a6], define the difference matrix delta = [a7, a8, a9], and perform the following operations:
[0122] a(1:N, 1:M, 1:a 10 +1) = 0
[0123] dx(1:N, 1:M, 1:a 10 +1) = 0
[0124] dy(1:N, 1:M, 1:a 10 +1) = 0
[0125] d(1:N, 1:M, 1:a 10 +1) = 0
[0126] B2: Calculate the gradient of the image through convolution operation to obtain dx and dy:
[0127] a(:, :, 1) = conv(h, h, u)
[0128] dx(:, :, 1) = conv(delta, g, u)
[0129] dy(:, :, 1) = conv(g, delta, u)
[0130] Calculate the gradient information of the image through the convolution kernel:
[0131] x = dx(:, :, 1)
[0132] y = dy(:,:,1)
[0133]
[0134] where a1, a2, a3, a4, a5, a6, a7, a8, a9, and a 10 are all constants, and the values of the constants are adjusted accordingly according to the output effect (contrast, brightness, etc.) of the final image; the symbol "conv" refers to the calculation with convolution;
[0135] B3: Adjust the size of the convolution kernel and perform convolution operations to optimize the image. Set the size lh and lg of the convolution kernel, and update the size of the convolution kernel through the following formula:
[0136] lhj = 2^j * (lh - 1) + 1
[0137] lgj = 2^j * (lg - 1) + 1
[0138] For each iteration, calculate the convolution operation of the convolution kernel and the image, and gradually adjust the size of the convolution kernel and the image processing process:
[0139] hj(1:lhj) = 0
[0140] gj(1:lgj) = 0
[0141] Update the weight of the convolution kernel through each iteration:
[0142] a(:,:,j + 1) = conv(hj, hj, a(:,:,j))a(:,:,j + 1)
[0143] dx(:,:,j + 1) = conv(δ, gj, a(:,:,j))dx(:,:,j + 1)
[0144] dy(:,:,j + 1) = conv(gj, δ, a(:,:,j))dy(:,:,j + 1)
[0145] Update x = dx(:,:,j + 1), y = dy(:,:,j + 1), and repeat the iteration until the finally enhanced image is obtained;
[0146] B3: Output the finally enhanced image.
[0147] Embodiment 2:
[0148] As Figure 1 shown, this embodiment provides an image enhancement filtering method based on a simple function under low light and near-infrared light conditions, including the following steps:
[0149] S1: Obtain an image under infrared light conditions.
[0150] S2: Preprocess the image obtained in step S1, including grayscale conversion and double-precision storage:
[0151] Grayscale conversion: Process independent pixel points, and visually improve the image by changing the grayscale range occupied by the original image data; the purpose of grayscale conversion is to improve the image quality and make the display effect of the image clearer.
[0152] Double-precision storage: For 64-bit floating-point numbers, the highest 1 bit is the sign bit S, the following 11 bits are the exponent E, and the remaining 52 bits are the significant digits M. The storage in memory is implemented according to the IEEE 754 standard. Generally, pictures are stored in uint8 data. When performing data operations on pictures, data overflow occurs when the data is greater than 256, and the result is distorted. However, no overflow occurs during double-precision number operations. Therefore, by converting uint8 data to double-precision numbers first, the calculation accuracy will not be distorted.
[0153] S3: Extract low-frequency approximation coefficients from the preprocessed image through wavelet transform decomposition;
[0154] S4: Construct an image enhancement filtering module based on the atanh function and the sech function;
[0155] In this embodiment, an image enhancement filtering algorithm based on the sech function is used to perform a mathematical transformation on the low-frequency approximation coefficients, specifically including:
[0156] C1: Read an image in JPG format and convert it to a grayscale image;
[0157] C2: Perform wavelet transform processing on the input grayscale image, decompose it into approximation coefficients and detail coefficients, and the approximation coefficients in the low-frequency part are denoted as u2;
[0158] C3: Perform a mathematical transformation on the approximation coefficients u2 in the low-frequency part to enhance the image contrast and suppress noise, specifically including:
[0159] u3 = d1 * sech(d2 * u2)
[0160] u4 = log(u3)
[0161] u5 = u4 m
[0162] Among them, d1, d2, and m are constants. The values of the constants are adjusted accordingly according to the output effects (such as contrast, brightness, etc.) of the final picture.
[0163] S5: Calculate the image gradient using convolution operation based on the low-frequency approximation coefficients after mathematical transformation; adjust the size of the convolution kernel and iteratively optimize the image; output the enhanced image after processing.
[0164] Step S5 specifically includes:
[0165] D1: Perform inverse wavelet transform on the enhanced coefficient u5 to obtain the enhanced image u6, whose size is defined as [N1, M1]. Define the convolution kernel matrices h = [0.15, 0.175, 0.175, 0.125], g = [0.5, -0.5], define the difference matrix delta = [1, 0, 0], and perform the following operations:
[0166] a1(1:N1, 1:M1, 1:J+1) = 0
[0167] dx1(1:N1, 1:M1, 1:J+1) = 0
[0168] dy1(1:N1, 1:M1, 1:J+1) = 0
[0169] d1(1:N1, 1:M1, 1:J+1) = 0
[0170] Calculate the gradient of the image through convolution operation to obtain dx and dy:
[0171] a1(:, :, 1) = conv(h1, h1, u6)
[0172] dx1(:, :, 1) = conv(delta1, g1, u6)
[0173] dy1(:, :, 1) = conv(g1, delta1, u6)
[0174] Calculate the gradient information of the image through the convolution kernel:
[0175] x1 = dx1(:, :, 1);
[0176] y1 = dy1(:, :, 1);
[0177]
[0178] D2: Adjust the size of the convolution kernel and perform convolution operation to optimize the image. Set the sizes of the convolution kernels h1 and g1 to lh2 and lg2 respectively, and update the size of the convolution kernel through the following formula:
[0179] lhj2 = 2^j2 * (lh2 - 1) + 1
[0180] lgj2 = 2^j2 * (lg2 - 1) + 1
[0181] For each iteration, calculate the convolution operation of the convolution kernel and the image, and gradually adjust the size of the convolution kernel and the image processing process:
[0182] hj2(1:lhj2) = 0
[0183] gj2(1:lgj2) = 0
[0184] Update the weights of the convolution kernel through each iteration:
[0185] a2(:,:,j2 + 1) = conv(hj2, hj2, a2(:,:,j2))
[0186] dx2(:,:,j2 + 1) = conv(delta2, gj2, a2(:,:,j2))
[0187] dy2(:,:,j2 + 1) = conv(gj2, delta2, a2(:,:,j2))
[0188] Update x2 = dx2(:,:,j2 + 1); y2 = dy2(:,:,j2 + 1), and repeat the iteration until the finally enhanced image is obtained;
[0189] D3: Output the finally enhanced image.
[0190] Example 3:
[0191] To verify the effectiveness and effect of the method of the present invention, six examples are used in this example to illustrate, where the entropy metric (ME) and the Michelson contrast (MC) are used to evaluate the quality of the processed image, specifically as follows:
[0192] Example 1: As Figure 2 shown, Figure 2 in (a) are five images obtained under low light conditions in this example, (b) is the image processed by the atanh filter, and (c) is the image processed by the sech filter. The image quality after processing by the two filters is shown in Table 1.
[0193] Table 1 Evaluation values of images processed by atanh and sech filters under low light conditions
[0194]
[0195] Among them, the entropy metric (ME): the larger the better; the Michelson contrast (MC): the larger the better. It can be seen from Table 1 that when comparing the effects of the two algorithms for different types of pictures, the atanh filter and the sech filter each have their own advantages and disadvantages.
[0196] Example 2: As Figure 3 shown,Figure 3 In (a), five images obtained under near-infrared light conditions in this example are shown. (b) is the image processed by the atanh filter, and (c) is the image processed by the sech filter. The image quality after processing by the two filters is shown in Table 2.
[0197] Table 2 Evaluation values of images processed by atanh and sech filters under near-infrared light conditions
[0198]
[0199] It can also be seen from Table 2 that when comparing the effects of the two algorithms for different types of pictures, the atanh filter and the sech filter each have their own advantages and disadvantages.
[0200] Example 3: For the application of underwater image contour extraction, Figure 4 In (a), the processing results of the five images obtained under near-infrared light conditions in this example after using the two filters are respectively as Figure 4 shown in (b) and (c). It can be found that the sech filter can display many key features of the input image.
[0201] Example 4: For the application of image fusion, use the atanh and sech filters to fuse Figure 5 the two pictures of Stone and Wintersweet shown in (a). The scale of the filter is controlled by the values of n and m, and the processing results are as Figure 5 shown in (b) and (c). It can be found that the key features of the original images are retained in the fused image.
[0202] Example 5: For the application of image edge detection, use the two filters to extract Figure 6 the picture shown in (a). The results are respectively as Figure 6 shown in (b) and (c). It can be found that the two filters are effective for detecting the contours of array objects.
[0203] Example 6: For the application of image array detection, use the two filters to extract Figure 7 the picture shown in (a). The results are respectively as Figure 7 shown in (b) and (c). It can be found that the atanh filter shows a clear contour after processing, and the image processed by the sech filter shows stacked features.
Claims
1. An image enhancement filtering method based on a simple function under low-light and near-infrared light conditions, characterized in that It includes the following steps: S1: Obtain an image under low light or near-infrared light conditions; S2: Preprocess the image obtained in step S1; S3: Extract the low-frequency approximation coefficients by decomposing the preprocessed image through wavelet transform; S4: Construct an image enhancement filtering module based on the atanh function and the sech function, and perform a mathematical transformation on the low-frequency approximation coefficients; S5: Calculate the image gradient using convolution operation according to the low-frequency approximation coefficients after the mathematical transformation; Adjust the convolution kernel size and iteratively optimize the image; Output the processed enhanced image.
2. The image enhancement filtering method based on a simple function under low light and near-infrared light conditions according to claim 1, characterized in that The preprocessing in step S2 includes grayscale conversion and double-precision storage.
3. A method for constructing an image enhancement filter based on a simple function under low-light and near-infrared light conditions according to claim 1, characterized in that The image enhancement filtering module in step S4 includes an image enhancement filtering algorithm part based on the atanh function and an image enhancement filtering algorithm part based on the sech function.
4. A method for constructing an image enhancement filter based on a simple function under low light and near-infrared light conditions according to claim 3, characterized in that, The image enhancement filtering algorithm based on the atanh function in step S4 performs a mathematical transformation on the low-frequency approximation coefficients, specifically including: A1: Read an image in JPG format and convert it to a grayscale image; A2: Perform wavelet transform processing on the input grayscale image, decompose it into approximation coefficients and detail coefficients, and the approximation coefficients in the low-frequency part are represented as u; A3: Perform a mathematical transformation on the approximation coefficients u in the low-frequency part to enhance the image contrast and suppress noise.
5. A method for constructing an image enhancement filter based on a simple function under low-light and near-infrared light conditions according to claim 4, characterized in that, The specific content of step A3 includes r = log(u) r1 = c1*(csch(r))*log(r)+c2*(csch(c3*r))*log(c4*r)+c5*csch(c6*r)*log(c7*r) r2 = log(r) r3 = atanh((c8*sinh(r2 + c9) / r2) r4=r3 n where c1, c2, c3, c4, c5, c6, c7, c8, c9, n are constants.
6. A method for constructing an image enhancement filter based on a simple function under low light and near-infrared light conditions according to claim 5, characterized in that The specific content of step S5 includes: B1: Define the image size as [N,M], define the convolution kernel matrix h = [a1,a2,a3,a4], g = [a5,a6], define the difference matrix delta = [a7,a8,a9], and perform the following operations: a(1:N,1:M,1:a 10 +1) = 0 dx(1:N,1:M,1:a 10 +1) = 0 dy(1:N,1:M,1:a 10 +1) = 0 d(1:N,1:M,1:a 10 +1) = 0 B2: Calculate the gradient of the image through convolution operation to obtain dx and dy: a(:,:,1) = conv(h,h,u) dx(:,:,1) = conv(delta,g,u) dy(:,:,1) = conv(g,delta,u) Calculate the gradient information of the image through the convolution kernel: x = dx(:,:,1) y = dy(:,:,1) where a1, a2, a3, a4, a5, a6, a7, a8, a9 and a 10 are all constants; the symbol "conv" refers to the calculation with convolution; B3: Adjust the size of the convolution kernel and perform convolution operation to optimize the image. Set the size of the convolution kernel as lh and lg, and update the size of the convolution kernel through the following formula: lhj = 2^j*(lh - 1)+1 lgj = 2^j*(lg - 1)+1 For each round of iteration, calculate the convolution operation between the convolution kernel and the image, and gradually adjust the size of the convolution kernel and the image processing process: hj(1:lhj) = 0 gj(1:lgj) = 0 Update the weight of the convolution kernel through each iteration: a(:,:,j + 1) = conv(hj,hj,a(:,:,j))a(:,:,j + 1) dx(:,:,j + 1) = conv(δ, gj, a(:,:,j))dx(:,:,j + 1) dy(:,:,j + 1) = conv(gj, δ, a(:,:,j))dy(:,:,j + 1) Update x = dx(:,:,j + 1), y = dy(:,:,j + 1), and repeat the iteration until the final enhanced image is obtained; B3: Output the final enhanced image.
7. An image enhancement filtering method based on a simple function under low light and near-infrared light conditions according to claim 3, characterized in that In step S4, the image enhancement filtering algorithm based on the sech function performs a mathematical transformation on the low - frequency approximation coefficients, specifically including: C1: Read an image in JPG format and convert it into a grayscale image; C2: Perform wavelet transform on the input grayscale image, decompose it into approximation coefficients and detail coefficients, and the approximation coefficients of the low - frequency part are denoted as u2; C3: Perform a mathematical transformation on the approximation coefficients u2 of the low - frequency part to enhance the image contrast and suppress noise.
8. A method for constructing an image enhancement filter based on a simple function under low light and near-infrared light conditions according to claim 7, characterized in that, The specific steps of step C3 include: u3 = d1 * sech(d2 * u2) u4 = log(u3) u5 = u4 m where d1, d2, m are constants.
9. A method for constructing an image enhancement filter based on a simple function under low-light and near-infrared light conditions according to claim 8, characterized in that, The specific steps of step S5 include: D1: Perform an inverse wavelet transform on the enhanced coefficient u5 to obtain the enhanced image u6, whose size is defined as [N1, M1]. Define the convolution kernel matrix h = [0.15, 0.175, 0.175, 0.125], g = [0.5, - 0.5], define the difference matrix delta = [1, 0, 0], and perform the following operations: a1(1:N1, 1:M1, 1:J + 1) = 0 dx1(1:N1, 1:M1, 1:J + 1) = 0 dy1(1:N1, 1:M1, 1:J + 1) = 0 d1(1:N1, 1:M1, 1:J + 1) = 0 Calculate the gradient of the image through convolution operation to obtain dx and dy: a1(:,:,1) = conv(h1, h1, u6) dx1(:,:,1) = conv(delta1, g1, u6) dy1(:,:,1) = conv(g1, delta1, u6) Calculate the gradient information of the image through the convolution kernel: x1 = dx1(:,:,1); y1 = dy1(:,:,1); D2: Adjust the size of the convolution kernel and perform convolution operation to optimize the image. Set the sizes of the convolution kernels h1 and g1 to lh2 and lg2 respectively, and update the size of the convolution kernel through the following formula: lhj2 = 2^j2 * (lh2 - 1) + 1 lgj2 = 2^j2 * (lg2 - 1) + 1 For each iteration, calculate the convolution operation of the convolution kernel and the image, and gradually adjust the size of the convolution kernel and the image processing process: hj2(1:lhj2) = 0 gj2(1:lgj2) = 0 Update the weights of the convolution kernel through each iteration: a2(:,:,j2 + 1) = conv(hj2, hj2, a2(:,:,j2)) dx2(:,:,j2 + 1) = conv(delta2, gj2, a2(:,:,j2)) dy2(:,:,j2 + 1)=conv(gj2,delta2,a2(:,:,j2)) Update x2 = dx2(:,:,j2 + 1); y2 = dy2(:,:,j2 + 1), and repeat the iteration until the final enhanced image is obtained; D3: Output the final enhanced image.