Low-illumination image enhancement algorithm based on improved sparrow search algorithm

The improved Sparrow Search Algorithm addresses inefficiencies in low-light image enhancement by optimizing parameters with Logistic mapping, adaptive thresholds, and differential evolution, ensuring reliable and efficient image quality across diverse scenarios.

CN120318102AActive Publication Date: 2025-07-15奈米科学仪器装备(杭州)有限公司
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510774171.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-11
Publication Date
2025-07-15
Estimated Expiration
2045-06-11

AI Technical Summary

Technical Problem

The quality of low-light images in the prior art is poor, and the optimization of traditional image denoising and enhancement algorithm parameters is time-consuming and labor-intensive, and it is difficult to ensure the best effect in different scenarios.

Method used

The improved sparrow search algorithm (SSA) was introduced, the population was initialized through Logistic mapping, the safety threshold was adjusted adaptively, differential evolutionary variants were introduced, and the combination of indicator optimization parameters such as PSNR and SSIM was automatically optimized to automatically optimize image denoising and enhancement algorithms.

Benefits of technology

It realizes efficient automatic parameter optimization for low-light images, ensuring the best enhancement effect in different scenarios, significantly saving time and energy, and improving image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120318102A_ABST
    Figure CN120318102A_ABST
Patent Text Reader

Abstract

The invention provides a low-illumination image enhancement algorithm based on an improved sparrow search algorithm, and aims to solve the problem that traditional parameter adjustment is time-consuming and labor-consuming. Through introducing Logistic mapping to carry out population initialization, adaptive dynamic adjustment of a safety threshold, differential evolution variation and other improvement measures, the stability and robustness of SSA are significantly improved. By means of the improved SSA, parameter combinations of various denoising and enhancement algorithms are automatically optimized, and it is ensured that the optimal enhancement effect can be obtained in different scenes. Besides, a comprehensive evaluation index combining the PSNR and the SSIM is defined, so that the image quality can be evaluated more comprehensively, and the brightness, the contrast ratio and the noise removal are ensured to reach the optimal state. The problem that traditional parameter adjustment is time-consuming and labor-consuming is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image detection, and particularly relates to a low-light image enhancement algorithm based on an improved sparrow search algorithm. Background Technique

[0002] In many application fields, such as security monitoring, autonomous driving, medical imaging, etc., the image quality under low-light conditions is often poor, showing problems such as insufficient brightness, low contrast, and severe noise. These problems not only affect the visual experience but also cause difficulties in subsequent image analysis and processing. To improve the quality of low-light images, traditional image denoising and enhancement algorithms (such as Contrast Limited Adaptive Histogram Equalization (CLAHE), Retinex theory, bilateral filter, etc.) have been widely applied to practical scenarios. However, the effects of these algorithms largely depend on the selection of parameters, and the process of determining the optimal parameters is usually time-consuming and laborious. Manually adjusting parameters is not only inefficient but also difficult to ensure the best results in all cases. Therefore, automatically optimizing these parameters has become an urgent problem to be solved.

[0003] The Sparrow Search Algorithm (SSA), as a new meta-heuristic optimization algorithm based on the foraging behavior of sparrows, has received extensive attention due to its efficient optimization ability and good global search performance. SSA finds the optimal solution to the problem by simulating the foraging behavior in a sparrow population and performs well in complex optimization problems. It has efficient optimization ability and can quickly find a better solution in a large solution space; the implementation method is simple. Compared with other swarm intelligence algorithms, the implementation of SSA is more intuitive, easy to understand and apply; and in various types of optimization problems, SSA can maintain good stability and convergence speed, showing strong robustness. These characteristics make SSA very suitable for automatically optimizing the parameters of low-light image denoising and enhancement algorithms, thus overcoming the problem of time-consuming and laborious parameter selection in traditional methods.

[0004] However, traditional SSA also has some deficiencies. First, the quality of the initial population has a great influence on the algorithm performance. The randomly generated initial population positions may lead to insufficient diversity and stability, thus affecting the optimization speed and convergence speed of the algorithm. Second, it is difficult to balance global search and local exploitation. When the safety threshold is a fixed parameter, the algorithm is prone to falling into local optima, wasting a large amount of computing power. Finally, there is a lack of an effective mutation mechanism, which results in insufficient population diversity, making it difficult for the algorithm to jump out of local optima in the later stage of iteration, restricting the space for further performance improvement.

[0005] In view of these advantages and disadvantages, the parameters of the improved SSA automatic optimization denoising and enhancement algorithm can be utilized to significantly improve the enhancement effect of low-light images, reduce the time and effort of manual parameter adjustment, and provide more reliable technical support for practical applications. Summary of the Invention

[0006] The purpose of the present invention is to provide a low-light image enhancement algorithm based on an improved sparrow search algorithm to solve the problems of poor quality of low-light images and time-consuming and laborious optimization of denoising and enhancement parameters in the prior art. The technical solutions adopted are as follows: A low-light image enhancement algorithm based on an improved sparrow search algorithm, the main steps of which are: Step 1: Improve the traditional sparrow search algorithm. Specifically, it includes the following three aspects of improvement: Introduce Logistic mapping for population initialization: Use Logistic mapping to generate the initial population to improve the diversity and uniformity of the initial population and avoid the edge aggregation problem caused by random generation.

[0007] Adaptive dynamic adjustment of the safety threshold: Dynamically adjust the safety threshold according to the number of iterations or the dispersion degree of the current population to balance the global search and local development capabilities and avoid falling into local optima.

[0008] Introduce differential evolution mutation: Generate new individuals by linearly combining three different individuals to increase the diversity of the population and prevent premature convergence.

[0009] These improvement measures can enhance the stability and robustness of the SSA, making it perform better in complex optimization problems.

[0010] Step 2: Determine the combination method of the image denoising algorithm and the enhancement algorithm.

[0011] Specifically, select a variety of denoising and enhancement algorithms (including but not limited to CLAHE, Retinex theory, bilateral filter), and determine their combination methods. These algorithms can be flexibly selected and combined according to specific application scenarios to meet different requirements.

[0012] Step 3: Define a comprehensive evaluation function.

[0013] Preferably, define a comprehensive evaluation function combining PSNR and SSIM to more comprehensively evaluate the image quality and ensure that the brightness, contrast, and noise removal reach the best state. In addition, other visual quality evaluation indicators, such as visual information fidelity (VIF), can be considered to further improve the evaluation system.

[0014] Step 4: Automatically optimize the parameter combination using the improved SSA.

[0015] Specifically, the improved SSA is used to automatically optimize the parameter combinations of various denoising and enhancement algorithms, ensuring optimal enhancement effects in different scenarios. Through automated parameter optimization, time and effort are significantly saved, while ensuring the consistency and reliability of the enhancement effects.

[0016] Step 5: Denoise and enhance the low-light image.

[0017] Apply the optimized parameter combination to denoise and enhance the low-light image, improving the overall quality of the image and ensuring high-quality image output in various application scenarios.

[0018] The method is applicable to various application scenarios that require high-quality low-light images, such as security monitoring, autonomous driving, and medical imaging. In addition, the present invention can also be applied to other fields, such as drone aerial photography and night photography, providing users with a clearer and more realistic image experience. Compared with the prior art, the advantages of the present invention are: 1. Introduce the sparrow search algorithm to automatically select multi-threshold combinations.

[0019] In traditional methods, manually adjusting parameters is time-consuming and laborious and difficult to ensure the best effect. By introducing the improved SSA, the present invention realizes the automated parameter optimization of multi-algorithms for denoising and enhancement, not only significantly saving time and effort, but also ensuring optimal enhancement effects in different scenarios. In addition, a comprehensive evaluation index is defined to quantify the image enhancement effect, guiding the SSA to select the optimal parameter combination to ensure that the image reaches the best state in terms of brightness, contrast, and noise removal.

[0020] 2. Improve the sparrow search algorithm in view of the deficiencies of traditional methods.

[0021] The present invention introduces Logistic mapping for population initialization to improve the diversity and uniformity of the initial population; adaptively dynamically adjusts the safety threshold to balance the global search and local development capabilities and avoid falling into local optima; introduces differential evolution mutation to increase the diversity of the population and prevent premature convergence. Through these improvement measures, while maintaining the high-efficiency optimization ability, the stability and robustness of the SSA can be significantly improved.

[0022] By introducing the improved SSA, the automatic optimization of the parameters of the low-light image denoising and enhancement algorithm is achieved, solving the problem of time-consuming and laborious parameter adjustment in traditional methods. Using the improved SSA, the present invention not only greatly saves time and effort but also ensures obtaining the optimal enhancement effect in different scenarios. By defining comprehensive evaluation indicators, the image quality is more comprehensively evaluated to ensure that the brightness, contrast, and noise removal reach the best state. These innovations provide an efficient and reliable solution for low-light image enhancement, applicable to various application scenarios such as security monitoring, autonomous driving, and medical imaging. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is a flowchart of the low-light image enhancement algorithm based on the improved sparrow search algorithm; Figure 2 It is a schematic diagram of parameter combination optimization; Figure 3 It is a schematic diagram of the improvement of the sparrow search algorithm. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0024] The low-light image enhancement algorithm based on the improved sparrow search algorithm of the present invention will be described in more detail below with reference to the schematic diagrams, in which the preferred embodiments of the present invention are shown. It should be understood that those skilled in the art can modify the present invention described herein while still achieving the advantageous effects of the present invention. Therefore, the following description should be understood as a broad guidance for those skilled in the art and not as a limitation to the present invention.

[0025] As Figure 1 shown, the low-light image enhancement algorithm based on the improved sparrow search algorithm (Sparrow Search Algorithm, SSA) includes the following steps: Step 1: Improve the sparrow search algorithm. Specifically, it includes the following three aspects of improvement: Introduce Logistic mapping for population initialization to improve the diversity and uniformity of the initial population and avoid the edge aggregation problem caused by random generation; Dynamically adjust the safety threshold adaptively according to the number of iterations or the dispersion degree of the current population to balance the global search and local development capabilities and avoid falling into local optima; Introduce differential evolution mutation to generate new individuals by linearly combining three different individuals, increasing the diversity of the population and preventing premature convergence.

[0026] Step 2: Determine the combination method of the image denoising algorithm and the enhancement algorithm.

[0027] Specifically, select a variety of denoising and enhancement algorithms (including but not limited to bilateral filter, CLAHE, Retinex theory), and determine their combination methods.

[0028] These algorithms can be flexibly selected and combined according to specific application scenarios to meet different requirements.

[0029] Step 3: Define a comprehensive evaluation function.

[0030] Define a comprehensive evaluation function that combines Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity (SSIM) to more comprehensively evaluate image quality and ensure that brightness, contrast, and noise reduction reach the optimal state.

[0031] (1) Among them, and are the weight factors of PSNR and SSIM respectively. Considering the difference in numerical scales, set .

[0032] In addition, other visual quality evaluation metrics, such as Visual Information Fidelity (VIF), can be considered to further improve the evaluation system.

[0033] Step 4: Use the improved SSA to automatically optimize the parameter combination.

[0034] Specifically, use the improved SSA to automatically optimize the parameter combinations of various denoising and enhancement algorithms to ensure optimal enhancement effects in different scenarios.

[0035] Through automated parameter optimization, a significant amount of time and effort can be saved, while ensuring the consistency and reliability of the enhancement effects.

[0036] Step 5: Perform image denoising and enhancement on the new low-light images (images taken in situations with insufficient light or almost no light source).

[0037] Apply the optimized parameter combination to perform denoising and enhancement processing on the low-light images, improving the overall quality of the images and ensuring high-quality image output in various application scenarios.

[0038] Figure 2 is a schematic diagram of the parameter combination optimization of the present invention, that is, Step 4, which specifically includes the following steps: Step 4A: Receive the low-light image and the corresponding high-quality original image as inputs.

[0039] Low-light images have low contrast and brightness, unclear details, and may contain noise. High-quality images corresponding to low light are used as a benchmark for training and evaluation. A dataset containing low-light images and corresponding high-quality original images is collected or generated. These image pairs can come from public datasets (such as the LOL dataset) or be generated through simulation. If the simulation generation method is adopted, it is necessary to ensure the consistency between each pair of images, that is, the low-light images are generated from the high-quality images in a unified way (such as reducing brightness, adding noise, etc.). Receive low-light images and the corresponding high-quality original images as input. Perform preprocessing operations of normalization and cropping on the input images to facilitate the subsequent training process.

[0040] Step 4B: Apply bilateral filtering to the low-light images for denoising to determine the parameters and value ranges F1 involved in optimization.

[0041] To reduce this noise while retaining the important edge information of the image, bilateral filtering is applied for denoising.

[0042] This process needs to comprehensively consider the spatial proximity of pixels and the similarity of pixel values. The parameters involved in optimization specifically include: Spatial standard deviation : Used to control the size of the spatial neighborhood of pixels, with the range set to [1, 3]; Intensity standard deviation : Used to control the influence range of gray similarity, with the range set to [0.05, 0.2]; Window size : Affects the calculation range of the filter, with the range set to [3, 7].

[0043] Step 4C: Use the Retinex theory to enhance the denoised low-light images to determine the parameters and value ranges F2 involved in optimization.

[0044] The Retinex algorithm simulates the way the human visual system processes light, decomposes the image into a reflection component and an illumination component, and can thus effectively improve the color fidelity and dynamic range of the image. The parameters involved in optimization specifically include: Scale parameter : Used to define the illumination estimation at different scales, with the range of [1, 8]; Reflection component weight : Adjusts the balance between the reflection component and the illumination component, with the range of [0.5, 1.0]; Multi-scale fusion parameter : Used to fuse the results of different scales to ensure the improvement of the overall image quality, with the range of [0.1, 0.9], and the sum is 1.

[0045] At this stage, the brightness and contrast of the image are significantly improved, and the details in the dark areas are also more obvious.

[0046] Step 4D: Further enhance the local contrast of the low-light image based on CLAHE to determine the parameters and value ranges F3 involved in the optimization.

[0047] To further enhance the local contrast of the image and avoid the over-enhancement problem that may be caused by the global method, CLAHE is introduced. The parameters involved in the optimization specifically include: Clip limit : Used to control the intensity of histogram equalization, prevent artifacts caused by over-enhancement, and the range is [2, 4]; Grid size : Used to determine the size of the local area and affect the equalization effect. It is set as a square grid with a range of [4, 16].

[0048] By adjusting the clip limit and grid size, the enhancement effect can be controlled to ensure that the image is neither too flat nor too glaring.

[0049] Step 4E: Obtain the peak signal-to-noise ratio (PSNR) and structural similarity (SSIM). Specifically, it includes the following steps: First, calculate the mean squared error (MSE): (2) Where, and represent the processed low-light image and the original high-quality image respectively. and are the height and width of the image respectively.

[0050] - Pixel value at the pixel point of the original high-quality image; Then calculate PSNR: (3) Where, is the maximum possible value of the image pixel value (255 for 8-bit grayscale images).

[0051] Furthermore, both the original high-quality image and the processed low-light image are divided into non-overlapping small blocks of size 8×8. The SSIM values of each corresponding small block of the two images are calculated using the SSIM formula: (4) Where, represents the average of all pixel values in the small block of image ; Indicates the degree of dispersion of pixel values around their mean, i.e., variance; is the covariance, which measures the linear relationship between two variables and and is a constant used to stabilize the denominator and prevent it from approaching zero. It can take and . .

[0052] Specifically, includes: , .

[0053] includes: , .

[0054] includes: .

[0055] The mean , variance and covariance are calculated as follows: (5) where is the th pixel value in the small block, is the total number of pixels in the small block.

[0056] (6) (7) where and are the pixel values at the th pixel positions of the corresponding small blocks in the two images, respectively.

[0057] In formulas (5) to (7), has the same meaning.

[0058] The SSIM values of all small blocks are summed and averaged to obtain the SSIM value of the entire image.

[0059] To find the best parameter combination to achieve the most ideal image quality, the improved sparrow search algorithm is used to optimize the above parameter combination { , , , , , , , }.

[0060] Step 4F. Obtain the optimal parameter combination based on the improved sparrow search algorithm.

[0061] In this optimization process, a comprehensive evaluation function is combined to evaluate the image quality of low-light images under different parameter combination configurations.

[0062] Then, by continuously iteratively updating the positions of individuals in the population, a set of parameter combination settings that can optimize the image quality is finally found.

[0063] In this way, the conversion process from low-light images to high-quality enhanced images is completed.

[0064] Figure 3 It is a schematic diagram of the improvement of the sparrow search algorithm of the present invention.

[0065] Step 4F1. Initialize the population.

[0066] In the initialization stage, in order to improve the diversity and uniformity of the initial population and avoid the edge aggregation problem caused by random generation, the Logistic map is used to generate the initial population.

[0067] The Logistic map formula can be expressed as: (8) where is the control parameter, which determines the dynamic behavior of the system.

[0068] Set , and this value is located in the chaotic region, which is used to ensure that the sequence generated by the Logistic map has good randomness and uniform distribution characteristics; is the initial value, and its range is set between [0.1, 0.9] to avoid falling into extreme situations; represents the current iteration number, is the value at the th step, is the next value calculated through calculation.

[0069] Using the selected and , a series of numerical values are iteratively generated according to the Logistic map formula.

[0070] According to the parameter dimension to be optimized is 8, the maximum number of iterations is selected to be 2 to 5 times the dimension number of the parameter to be optimized, that is, the maximum number of iterations is set to 16 to 40 times.

[0071] Map the sequence generated by the Logistic map into the actual optimization parameter space to ensure that the initial value distribution in each dimension is uniform and diverse.

[0072] For the range of parameters to be optimized, the generated sequence can be mapped into the actual optimization parameter space through linear transformation. Assume that the value ranges of the parameters to be optimized are ( ), then the linear transformation formula is: (9) where is the actual optimized value of the -th dimension parameter; is the value generated by the Logistic map, and its range is between [0, 1].

[0073] Take the coordinates formed by these generated values as the positions of the initial population, ensuring that the distribution of the population in the solution space is more uniform, reducing the possibility of edge aggregation, and improving the global search ability.

[0074] Step 4F2: Calculate the individual fitness value.

[0075] 1. For each individual, that is, a set of parameter combinations { }, apply this set of parameters to enhance the low-light image to obtain the enhanced image.

[0076] 2. Calculate the PSNR and SSIM for the enhanced image and the input original high-quality image. The specific calculation method is carried out according to Step 4E, and then calculate the comprehensive evaluation function (Formula 1). Take the result of the comprehensive evaluation function as the fitness value of this individual. The higher the fitness value, the better this individual.

[0077] Step 4F3: Calculate the population dispersion degree.

[0078] In the iterative optimization stage, in order to balance the global search and local development capabilities and avoid falling into local optima, the safety threshold is adaptively adjusted according to the dispersion degree of the current population in each iteration: First, define the initial safety threshold , which is used to distinguish discoverers and followers. Among them, discoverers are responsible for exploring new areas, while followers follow existing paths.

[0079] Then, in each iteration, calculate the dispersion degree of the current population, which is used to evaluate the diversity of the population and determine whether to strengthen the global search or local development.

[0080] Preferably, calculate the average Euclidean distance between all individuals to characterize the population dispersion degree : (10) Among them, is the population size, and are respectively the position vectors of the -th and the -th individuals.

[0081] Step 4F4: Dynamically adjust the safety threshold.

[0082] Adaptively adjust the safety threshold : (11) Among them, represents the current safety threshold, is the initial safety threshold, is the initial population dispersion, is the current population dispersion. is the adjustment coefficient, taking .

[0083] In the initialization stage, after generating the initial population using the Logistic map, directly calculate the dispersion of the population at this time, that is, obtain the initial population dispersion . This value is a fixed reference point for comparing the current population dispersion in subsequent iterations. When the population dispersion is high, the safety threshold remains high to encourage global search; when the population gradually converges, the safety threshold decreases to strengthen local development.

[0084] Step 4F5: Distinguish between discoverers and followers.

[0085] Distinguish between discoverers and followers according to the fitness value and the safety threshold: Sort the fitness values , and select the top 10% of the individuals as discoverers, and the remaining 90% of the individuals as followers.

[0086] If it is necessary to further adjust the ratio of discoverers and followers, it can be dynamically adjusted according to . When is high, select more discoverers; when is low, reduce the proportion of discoverers and increase the number of followers.

[0087] Step 4F6: Mutation operation.

[0088] To increase the diversity of the population and prevent premature convergence, apply the differential evolution mutation method to further optimize the population. Generate new individuals by linearly combining three different individuals and update the population according to the fitness.

[0089] Randomly select three different individuals from the current population , and their positions are respectively denoted as .

[0090] Generate a new candidate individual by linearly combining the positions of these three individuals : (12) wherein is a scaling factor, set between [0.5, 1].

[0091] Step 4F7, update the individual positions.

[0092] Compare the newly generated individual with the current individual. If the fitness of the new individual is better, replace the current individual with the new individual to update the population.

[0093] When the termination condition is met, that is, when the preset maximum number of iterations is reached or the convergence condition is satisfied (such as the change in the best fitness is less than the set threshold in successive iterations , stop the iteration and output the individual with the highest fitness in the current population as the optimal parameter combination. Otherwise, continue to go to the fitness value calculation and repeat the iteration.

[0094] The above is only the preferred embodiment of the present invention and does not impose any limitation on the present invention. Any person skilled in the art, without departing from the scope of the technical solution of the present invention, makes any form of equivalent replacement or modification and other changes to the technical solution and technical content disclosed in the present invention, which are all within the content of the technical solution of the present invention and still fall within the protection scope of the present invention.

Claims

1. A low-light image enhancement algorithm based on an improved sparrow search algorithm, characterized in that It includes the following steps: Step 1, improve the sparrow search algorithm; Step 2, determine the combination mode of the image denoising algorithm and the enhancement algorithm; Step 3, define a comprehensive evaluation function; Step 4, use the improved SSA to automatically optimize the parameter combination; Step 5, apply the optimized parameter combination to perform image denoising and enhancement on new low-light images.

2. The low-light image enhancement algorithm based on the improved sparrow search algorithm according to claim 1, wherein Specifically included in the said Step 1 are: introducing Logistic mapping for population initialization, adaptively and dynamically adjusting the safety threshold, and introducing differential evolution mutation.

3. The low-light image enhancement algorithm based on the improved sparrow search algorithm according to claim 2, wherein, The said adaptively and dynamically adjusting the safety threshold is dynamically adjusted according to the number of iterations or the dispersion degree of the current population.

4. The low-light image enhancement algorithm based on the improved sparrow search algorithm according to claim 2, characterized in that, The said differential evolution mutation generates new individuals by linearly combining three different individuals.

5. The low-light image enhancement algorithm based on the improved sparrow search algorithm according to claim 1, characterized in that, The denoising and enhancement algorithms in Step 2 include but are not limited to Contrast Limited Adaptive Histogram Equalization (CLAHE), Retinex theory, and bilateral filter.

6. The low-light image enhancement algorithm based on the improved sparrow search algorithm according to claim 1, characterized in that The comprehensive evaluation function in Step 3 includes Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity Index (SSIM).

Citation Information

Patent Citations

  • Coal rock boundary image enhancement method based on chaos sparrow search algorithm

    CN113344828A

  • Traffic signal control optimization method based on improved sparrow search algorithm

    CN115100864A

  • Underground fully-mechanized coal mining equipment positioning method based on synchronous positioning and composition

    CN115930956A

  • Image enhancement optimization method based on multi-strategy improved sparrow search

    CN119494801A

  • SSA-SVM-based GIS fault mode recognition method

    WO2024016623A1