Low-illumination image enhancement method and system based on hyperbolic function filter
By using hyperbolic function filters for multi-scale filtering in low-illumination image processing, the problem of insufficient low-illumination image quality in the prior art is solved, and higher contrast, detail performance and image quality are achieved.
Patent Information
- Application Number
- CN202510275538.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-06-27
AI Technical Summary
The prior art is difficult to effectively improve the contrast, detail performance and visibility of images in low illumination environments, and often lead to increased noise and decreased image quality.
The low-illumination image enhancement method based on hyperbolic function filter is adopted, and the low-illumination image is multi-scale filtered through hyperbolic sine function filter and hyperbolic cosine function filter, combining wavelet transformation and grayscale conversion to improve image quality.
It significantly improves the edge and detail performance of low-illumination images, reduces noise interference, ensures the overall quality of the image, and is suitable for complex imaging environments.
Smart Images

Figure CN120219175A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image processing, relates to low-light image enhancement technology, and specifically relates to a low-light image enhancement method and system based on a hyperbolic function filter. Background Art
[0002] With the continuous development of image processing technology, image enhancement in low-light environments has become a research hotspot. Under low-light or complex lighting conditions, the images captured by traditional imaging devices often have poor quality, blurred details, and cannot meet the actual application requirements. Therefore, how to improve the contrast, detail performance, and visibility of low-light images has become a technical problem to be solved urgently.
[0003] In the prior art, image enhancement methods mainly include histogram equalization, frameworks based on the Retinex theory, and machine learning technologies widely used in recent years. The histogram equalization method enhances the contrast by adjusting the gray distribution of the image, but it is prone to over-enhancement. Since the Retinex theory was proposed, it has shown good performance in processing images in complex lighting environments. It can effectively restore the color balance of the image, but it may also introduce noise, resulting in a decline in image quality. In addition, although machine learning methods can perform automated processing, the model training is complex, dependent on large-scale data, and the effects in low-light environments are sometimes unstable. Summary of the Invention
[0004] Object of the Invention: In order to overcome the deficiencies in the prior art, the present invention provides a low-light image enhancement method and system based on a hyperbolic function filter. By exploring the feasibility of mathematical functions in designing filters, the enhancement effect for low-light images can be improved, and the image quality of low-light images can be effectively enhanced.
[0005] Technical Solution: To achieve the above object, the present invention provides a low-light image enhancement method based on a hyperbolic function filter, including the following steps:
[0006] S1: Obtain the original low-light image;
[0007] S2: Preprocess the obtained low-light image;
[0008] S3: Filter the preprocessed low-light image with the constructed hyperbolic sine function filter and hyperbolic cosine function filter respectively to obtain the filtered and enhanced image;
[0009] S4: Evaluate the quality of the filtered and enhanced image;
[0010] S5: Output the enhanced image after quality evaluation.
[0011] Further, the low-illumination original image in step S1 is acquired by a fluorescence microscope or a near-infrared camera in a low-light environment.
[0012] Further, the preprocessing in step S2 includes image grayscale conversion and wavelet transform.
[0013] Further, the hyperbolic sine function filter in step S3 performs multi-scale filtering using an image enhancement filtering algorithm based on the sinh function, specifically including the following steps:
[0014] A1: Use an image in JPG format, which is converted into a grayscale image;
[0015] A2: Decompose the input image using wavelet transform; the extracted pixel values are used for further operations;
[0016] A3: Use a for loop, i.e.,
[0017] for m = 3:h - 1
[0018] for n = 3:w - 1
[0019] r = double(u(m,n))
[0020] where m and n are parameters of the control loop, h and w are parameters related to the image size, and u(m,n) is the pixel value of the input image;
[0021] A4: Use the following formula to obtain the new pixel value u:
[0022] r = u(m,n)
[0023] r1 = log(r)
[0024] r2 = cos(a1r)+cos(a2r)+cos(a3r)+cos(a4r)
[0025] r3 = a5*hypot(r1,e2)
[0026]
[0027] u2(m,n) = z P
[0028] end for
[0029] end for
[0030] where a1, a2, a3, a4, a5, a6, a7 are all constants.
[0031] A5: Obtain the output image according to the pixel values of u2(m,n).
[0032] Furthermore, in step S3, the hyperbolic cosine function filter performs multi-scale filtering using an image enhancement filtering algorithm based on the cosh function, which specifically includes the following steps:
[0033] B1: Read the image in JPG format and convert it into a grayscale image;
[0034] B2: Perform wavelet decomposition on the input image and extract the pixel value u3(m,n);
[0035] B3: Use a for loop, that is
[0036] for m2 = 3:h2 - 1
[0037] for n2 = 3:w2 - 1
[0038] where m2 and n2 are the parameters of the adjustment loop, and h2 and w2 are the dimension values of the image pixel matrix;
[0039] B4: Convert the value of u3(m,n) to double format, that is:
[0040] k2 = double(u3(m,n))
[0041] B5: Calculate a new pixel value u4(m2,n2) according to the following formula:
[0042] k3 = log(k2)
[0043] k4 = b1(sech(b2k3))*log(b3k3)+b4(sech(b5k3))*log(b6k3)+b7(sech(b8k3))*log(b9k3)
[0044] k5 = log(k3)
[0045] k6 = b 10 *hypot(k4,k5)
[0046]
[0047] u4(m2,n2) = z2 Q
[0048] end for
[0049] end for
[0050] where b1, b2, b3, b4, b5, b6, b7, b8, b9, b 10 、b 11 、b 12and b 13 are constants
[0051] B6: Obtain the processed image using the value of u4(m2,n2).
[0052] Furthermore, the quality assessment metrics in step S4 include edge contrast EME and mean contrast MC. EME is used to evaluate the edge sharpness of the image, and MC is used to evaluate the overall contrast of the image.
[0053] EME is obtained from the minimum value m1 and the maximum value m2 of the intensities of each block of the image, and is obtained in the following manner:
[0054] L i = 20 × log(m2 / m1)
[0055]
[0056] The calculation formula for MC is:
[0057] MC = (I1 - I2) / (I1 + I2)
[0058] where I1 is defined as the highest intensity value of the image, and I2 is defined as the lowest intensity value of the image.
[0059] The present invention also provides a low-light image enhancement system based on a hyperbolic function filter, including:
[0060] An image acquisition module for acquiring a low-light image;
[0061] An image preprocessing module for performing grayscale conversion or wavelet transform on the image;
[0062] A filtering module for performing filtering processing using hyperbolic sine and cosine function filters respectively;
[0063] A quality assessment module for assessing the quality of the enhanced image;
[0064] An output module for outputting the finally enhanced image.
[0065] Beneficial effects: Compared with the prior art, the present invention has the following advantages:
[0066] 1. The hyperbolic function filter can enhance the edges and details of the image in a low-light environment while preserving the overall image structure, enabling the key features in the low-light image to be clearly presented. The present invention is not only applicable to general low-light image processing, but also can be applied to complex imaging environments such as fluorescence microscopy imaging and near-infrared imaging, significantly improving the image quality in these scenarios.
[0067] 2. Existing enhancement methods (such as the Retinex theory) may lead to an increase in image noise. However, the present invention can effectively reduce noise interference while enhancing the image contrast through the hyperbolic filtering technique, ensuring the overall quality of the image.
[0068] 3. The filter proposed by the present invention can be used in combination with other traditional filtering methods, such as the watershed algorithm and convolutional filters, to further enhance the multi-scale details of the image, making the processed image more applicable in different scenarios (such as medical imaging, remote sensing images, etc.). BRIEF DESCRIPTION OF THE DRAWINGS
[0069] Figure 1 is a flowchart of the method of the present invention;
[0070] Figure 2 is a diagram showing the enhancement effect of a fluorescence image;
[0071] Figure 3 is a diagram showing the enhancement effect of a near-infrared camera image;
[0072] Figure 4 is a diagram showing the enhancement effect of a low-light image;
[0073] Figure 5 is a diagram showing the enhancement effect of a highly degraded image;
[0074] Figure 6 is an image of a tower and a mountain;
[0075] Figure 7 is an image after image fusion using a sinh filter;
[0076] Figure 8 is an image after image fusion using a cosh filter;
[0077] Figure 9 is an image after processing a pink fungus image;
[0078] Figure 10 is an effect diagram of processing an image by combining the filter with a matched filter;
[0079] Figure 11 is an effect diagram of processing a pink fungus image by combining the filter with a convolution-based filter. DETAILED DESCRIPTION OF THE INVENTION
[0080] The present invention will be further clarified below with reference to the accompanying 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 modifications made by those skilled in the art fall within the scope defined by the appended claims of this application.
[0081] Example 1:
[0082] As Figure 1 shown, this embodiment provides a low - illumination image enhancement method based on a hyperbolic - function filter, including the following steps:
[0083] S1: Acquire the original low - illumination image through a fluorescence microscope or a near - infrared camera in a low - light environment;
[0084] S2: Pre - process the acquired low - illumination image;
[0085] Convert the image to a grayscale image and perform wavelet transform
[0086] Since a color image contains multiple channels and is complex to process, by converting it to grayscale, the image can be transformed into single - channel luminance information, reducing the computational amount and highlighting the structural and luminance features of the image. At the same time, after removing color interference, the grayscale image is more suitable for filter operations, which helps to enhance the details and contrast of the image. And through wavelet transform, the details of the image can be captured at different resolutions, and noise can be effectively removed, enabling fine processing of image details in the high - frequency region, while the low - frequency part can be smoothed to avoid over - enhancement or loss of details in the image.
[0087] S3: Filter the pre - processed low - illumination image using the constructed hyperbolic sine function filter and hyperbolic cosine function filter respectively to obtain a filtered and enhanced image;
[0088] The hyperbolic sine function filter performs multi - scale filtering using an image enhancement filtering algorithm based on the sinh function, specifically including the following steps:
[0089] A1: Use an image in JPG format, which is converted into a grayscale image;
[0090] A2: Decompose the input image using wavelet transform; the extracted pixel values are used for further operations;
[0091] A3: Use a for loop, i.e.,
[0092] for m = 3:h - 1
[0093] for n = 3:w - 1
[0094] r = double(u(m,n))
[0095] where m and n are parameters of the control loop, h and w are parameters related to the image size, and u(m,n) is the pixel value of the input image;
[0096] A4: Use the following formula to obtain the new pixel value u:
[0097] r = u(m,n)
[0098] r1 = log(r)
[0099] r2 = cos(a1r)+cos(a2r)+cos(a3r)+cos(a4r)
[0100] r3 = a5*hypot(r1,r2)
[0101]
[0102] u2(m,n) = z P
[0103] end for
[0104] end for
[0105] Among them, a1, a2, a3, a4, a5, a6, and a7 are all constants, and these constant values need to be adjusted according to the actual output result, that is, the image quality. At the beginning, they can all be set to 1.
[0106] A5: Obtain the output image according to the pixel value of u2(m,n).
[0107] The hyperbolic cosine function filter performs multi-scale filtering using an image enhancement filtering algorithm based on the cosh function, specifically including the following steps:
[0108] B1: Read the JPG format image and convert it into a grayscale image;
[0109] B2: Perform wavelet decomposition on the input image and extract the pixel value u3(m,n);
[0110] B3: Use a for loop, that is
[0111] for m2 = 3:h2 - 1
[0112] for n2 = 3:w2 - 1
[0113] Among them, m2 and n2 are the parameters of the adjustment loop, and h2 and w2 are the dimension values of the image pixel matrix;
[0114] B4: Convert the value of u3(m,n) to the double format, that is:
[0115] k2 = double(u3(m,n))
[0116] B5: Calculate a new pixel value u4(m2,n2) according to the following formula:
[0117] k3 = log(k2)
[0118] k4 = b1(sech(b2k3)) * log(b3k3) + b4(sech(b5k3)) * log(b6k3) + b7(sech(b8k3)) * log(b9k3)
[0119] k5 = log(k3)
[0120] k6 = b 10 *hypot(k4,k5)
[0121]
[0122] u4(m2,n2) = z2 Q
[0123] end for
[0124] end for
[0125] Wherein, b1, b2, b3, b4, b5, b6, b7, b8, b9, b 10 , b 11 , b 12 and b 13 are constants, and these constant values need to be adjusted according to the actual output result, that is, the image quality. At the beginning, they can all be set to 1.
[0126] B6: Obtain the processed image using the value of u4(m2,n2).
[0127] S4: Evaluate the quality of the filtered and enhanced image;
[0128] The indicators for quality evaluation include the edge contrast EME and the mean contrast MC. EME is used to evaluate the edge sharpness of the image, and MC is used to evaluate the overall contrast of the image;
[0129] EME is obtained from the minimum value m1 and the maximum value m2 of the intensities of each block of the image, and is obtained through the following method:
[0130] L i = 20 × log(m2 / m1)
[0131]
[0132] The calculation formula for MC is:
[0133] MC = (I1 - I2) / (I1 + I2)
[0134] Wherein, I1 is defined as the highest intensity value of the image, and I2 is defined as the lowest intensity value of the image.
[0135] S5: Output the enhanced image after quality assessment, which is suitable for different application scenarios.
[0136] Embodiment 2:
[0137] To implement the method provided in Embodiment 1, this embodiment provides a low-light image enhancement system based on hyperbolic function filters, including:
[0138] An image acquisition module for acquiring low-light images;
[0139] An image preprocessing module for performing grayscale conversion or wavelet transform on the image;
[0140] A filtering module that applies hyperbolic sine and cosine function filters for filtering respectively;
[0141] A quality assessment module for assessing the quality of the enhanced image;
[0142] An output module for outputting the finally enhanced image.
[0143] Embodiment 3:
[0144] Based on the content of Embodiments 1 and 2, to verify the effectiveness and effect of the method of the present invention, in this embodiment, the image enhancement effect is analyzed under different situations, as follows:
[0145] 1) Enhance fluorescence images
[0146] Since the fluorescence signal generated in the sample is very weak, it is almost impossible to observe any details in the image. After being processed by the sinh filter or cosh filter, the outline of the fungal colony can be observed in the image, as Figure 2 shown, where a is the original pink fungal image under the fluorescence microscope, b is the pink fungal image processed by the sinh filter, and c is the pink fungal image processed by the cosh filter. The EME values and MC values of the pink fungi in the images processed by different filters are shown in Table 1. The EME value of the sinh filter is higher than that of the cosh filter. The MC value remains unchanged.
[0147] Table 1 EME values and MC values of pink fungal images
[0148] Filters EME MC thesinhfilter 7.6255 1 thecoshfilter 0.9520 1
[0149] 2) Enhance the images obtained by the near-infrared camera
[0150] Process the images obtained by the near-infrared camera ( Figure 3In which, a is an image named "Corner" captured by a near-infrared camera. The input image has a dark background, making it impossible to see anything. However, after processing with the filter of the present invention, clear edges and corners can be found. Figure 3 In which, b is the image processed by the sinh filter, and c is the image processed by the cosh filter. In the processing of the image corner, the EME value obtained by the sinh filter is higher than that of the cosh filter, while the MC value is the same (see Table 2).
[0151] Table 2 EME values and MC values of the image corner
[0152] Filters EME MC thesinhfilter 3.8003 1 thecoshfilter 1.6261 1
[0153] 3) Enhancement of low-light images
[0154] Figure 4 In which, a is an image named Road captured under low-light conditions. It is difficult to read any information from the original image. After processing the low-light image with the sinh filter or the cosh filter, the contrast and brightness of the image are significantly enhanced. And the road contour can be seen. Figure 4 In which, b is the road image processed by the sinh filter, and c is the road image processed by the cosh filter.
[0155] The EME values and MC values of the image Road processed by different filters are shown in Table 3. The EME value of the sinh filter is about 1.62 times that of the cosh filter. The MC value remains unchanged.
[0156] Table 3 EME values and MC values of the image Road
[0157] Filters EME MC thesinhfilter 4.7690 1 thecoshfilter 2.9373 1
[0158] 4) Enhancement of highly degraded images
[0159] Figure 5 In which, a shows an image named "Text". By adding Gaussian noise with a mean of 0.9, a highly degraded image is obtained, as shown in Figure 5 shown in b. Figure 5 In which, c is the image processed by the sinh filter, and d is the image processed by the cosh filter. Clear contours can be extracted from the highly degraded image in b. Although the Gaussian noise in the image is not completely eliminated, the outlines of the fonts in the text can be observed in these two images, which further helps to determine the content of the text. The EME and MC values are used to characterize the impact of using these filters on image processing of the image text (see Table 4). It can be seen that the EME value generated by the sinh filter is higher than that of the cosh filter.
[0160] Table 4 EME values and MC values of image texts
[0161] Filters EME MC thesinhfilter 1.4134 1 thecoshfilter 0.7618 1
[0162] 5) Applications in image fusion
[0163] A photo of a tower ( Figure 6 in a) and a photo of a mountain ( Figure 6 in b) were selected as the fusion objects, and the sinh filter and the cosh filter were used to fuse the two images respectively. Figure 7 and Figure 8 show the fusion effects of the two filters. Figure 7 In a, the image is after image fusion using the sinh filter when P = 2, b is the image after image fusion using the sinh filter when P = 16, and c is the image after image fusion using the sinh filter when P = 36; Figure 8 In a, the image is after image fusion using the cosh filter when Q = 20, b is the image after image fusion using the cosh filter when Q = 140, and c is the image after image fusion using the cosh filter when Q = 280. It is easy to find that both filters can provide good fusion effects. More interestingly, it is found that the fusion effect of the sinh filter changes with the change of the P value. It can be seen that the larger the P value, the more blurred the features of the tower. However, as the Q value increases, the feature contours of the object to be fused become more.
[0164] The filter based on hyperbolic functions was combined with the filter based on the watershed algorithm, the matched filter, and the filter based on convolution. First, the sinh filter or the cosh filter was used to process the image, and then other filters were used for continuous processing. The processing results of the two filter combinations for the pink fungus image are as Figure 9 , Figure 10 , Figure 11 shown. Figure 9 In a, the image is after processing the pink fungus image by combining the sinh filter with the filter based on the watershed algorithm, and b is the image after processing the pink fungus image by combining the cosh filter with the filter based on the watershed algorithm; Figure 10 In a, the image is processed by combining the sinh filter with the matched filter, and b is the image processed by combining the cosh filter with the matched filter; Figure 11 In a, the pink fungus image is processed by combining the sinh filter with the filter based on convolution, and b is the pink fungus image processed by combining the cosh filter with the filter based on convolution.
[0165] Surprisingly, compared with single-filter processing, this combined method can better preserve the edges and key features of the original image. When the noise is reduced, the contours of the image become more obvious. This combined method using filters can provide a better option for image enhancement, thus improving the image quality and visualization. Further research and experiments can explore more effective combinations of filters to further enhance the image. The values of EME and MC are used to characterize the impact of using the combined filter on image processing (see Table 5). It can be seen that combining the cosh filter and the convolution-based filter can generate the maximum values of EME and MC.
[0166] Table 5 shows the EME and MC values of the image of pink fungi obtained by combined filtering.
[0167]
[0168]
Claims
1. A low illumination image enhancement method based on a hyperbolic function filter, characterized in that: The steps include: S1: Get the original image with low illumination; S2: preprocessing the acquired low-light image; S3: filtering the preprocessed low-light image using the constructed hyperbolic sine function filter and the hyperbolic cosine function filter to obtain a filtered enhanced image; S4: perform quality assessment on the filtered and enhanced image; S5: Output the enhanced image after quality assessment.
2. The method for low illumination image enhancement based on a hyperbolic function filter according to claim 1, characterized in that: In step S1, the low-illumination original image is collected in a weak-light environment by a fluorescence microscope or a near-infrared camera.
3. The method for low illumination image enhancement based on a hyperbolic function filter according to claim 1, characterized in that: The preprocessing in step S2 includes image grayscale conversion and wavelet transformation.
4. The method for low illumination image enhancement based on a hyperbolic function filter according to claim 1, characterized in that: In step S3, the hyperbolic sine function filter uses an image enhancement filtering algorithm based on a sinh function to perform multi-scale filtering, which specifically includes the following steps: A1: Use an image in JPG format, which is converted into a grayscale image; A2: Decompose the input image using wavelet transform; the extracted pixel values are used for further operations; A3: Use a for loop, that is form=3:h-1 forn=3:w-1 r = double(um,n) Among them, m, n are the parameters of the control loop, h and w are parameters related to the image size, and u(m, n) is the pixel value of the input image; A4: Use the following formula to get the new pixel value u: r=um,n r1=logr r2=cosa1r+cosa2r+cosa3r+cosa4r r3=a5*hypotr1,r2 u2m,n=z P endfor endfor Among them, a1, a2, a3, a4, a5, a6, and a7 are all constants. A5: Get the output image according to the pixel value of u2m,n.
5. The method for low illumination image enhancement based on a hyperbolic function filter according to claim 1, characterized in that: In step S3, the hyperbolic cosine function filter uses an image enhancement filtering algorithm based on a cosh function to perform multi-scale filtering, which specifically includes the following steps: B1: Read the image in JPG format and convert it into a grayscale image; B2: Perform wavelet decomposition on the input image and extract pixel value u3(m,n); B3: Use a for loop, that is for m2=3:h2-1 for n2=3:w2-1 Among them, m2 and n2 are the parameters of the regulation loop, h2 and w2 are the dimension values of the image pixel matrix; B4: Convert the value of u3(m,n) into double format, that is: k2=double(u3(m,n)) B5: Calculate a new pixel value u4(m2,n2) according to the following formula: k3=logk2 k4=b1sechb2k3*logb3k3+b4sechb5k3*logb6k3+b7sechb8k3*logb9k3 k5=logk3 k6=b 10 *hypotk4,k5 <h2 style=";text-align:left;direction:ltr">u4(m2,n2) = z2<h2 style=";text-align:left;direction:ltr"> Q endfor endfor Among them, b1, b2, b3, b4, b5, b6, b7, b8, b9, b 10 , b 11 , b 12 and b 13 is a constant B6: Use the value of u4(m2,n2) to obtain the processed image.
6. The method for low illumination image enhancement based on a hyperbolic function filter according to claim 1, characterized in that: The quality evaluation indicators in step S4 include edge contrast EME and mean contrast MC, where EME is used to evaluate the edge clarity of the image and MC is used to evaluate the overall contrast of the image.
7. The method for low illumination image enhancement based on a hyperbolic function filter according to claim 6, characterized in that: In step S4, the EME is obtained by the minimum value m1 and the maximum value m2 of the intensity of each block of the image, and is obtained in the following way: <h2 style=";text-align:left;direction:ltr">L<h2 style=";text-align:left;direction:ltr"> i <h2 style=";text-align:left;direction:ltr"> =20×log(m2 / m1) 8. The method for low illumination image enhancement based on a hyperbolic function filter according to claim 6, characterized in that: The calculation formula of MC in step S4 is: MC=(I1-I2) / (I1+I2) Among them, I1 is defined as the highest intensity value of the image, and I2 is defined as the lowest intensity value of the image.
9. A low illumination image enhancement system based on a hyperbolic function filter, characterized in that: include: An image acquisition module, used for acquiring low-light images; An image preprocessing module is used to perform grayscale conversion or wavelet transform on the image; A filtering module, which applies a hyperbolic sine and cosine function filter to perform filtering processing; A quality assessment module, used for assessing the quality of the enhanced image; The output module is used to output the final enhanced image.