MSR and adaptive dark light image enhancement method applying LUT gamma correction post-processing
Through the adaptive dark light image enhancement method of post-processing of MSR and LUT gamma correction, combined with the multi-scale Retinex algorithm and gamma correction integral lookup table, the problem of insufficient image contrast improvement under dynamic dark light conditions is solved, and image quality is achieved Improved and real-time effects, suitable for a variety of application scenarios.
Patent Information
- Application Number
- CN202411084020.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-11-29
AI Technical Summary
The prior art is difficult to effectively improve image contrast under dynamic dark light conditions, and the method based on Retinex theory will lead to a decrease in image quality when contrast is improved, and the contrast is insufficient, which will affect the effect of application fields such as visual SLAM. The existing methods are There are shortcomings in real-time and complexity.
Adaptive dark light image enhancement method using MSR and LUT gamma correction post-processing, through the combination of input image quality evaluation, multi-scale Retinex algorithm and gamma correction integral lookup table, the image processing parameters are dynamically adjusted to achieve contrast and brightness. Balanced lift to avoid excessive enhancement.
A comprehensive self-judgment mechanism for image quality is realized, the overall quality of the image is improved, real-time and processing efficiency are improved, unnecessary enhancement processing is avoided, contrast and detailed information are improved, and dark-light image enhancement is suitable for different scenes. .
Smart Images

Figure CN119048408A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image processing, and in particular relates to an adaptive dark light image enhancement method using MSR and LUT gamma correction post-processing. Background Art
[0002] Under dynamic dark light conditions, the image may flicker. When the image is bright and of good quality, further enhancement will lead to over-enhancement, which will reduce the image quality and seriously affect subsequent image operations. Therefore, it is necessary to add an image quality judgment mechanism when inputting the image to overcome this problem.
[0003] At the same time, although the method based on Retinex theory has a good processing effect in improving image information entropy, brightness, and detail retention, its excessive improvement in image brightness leads to insufficient improvement in image contrast, resulting in poor processing effect in some application fields with high requirements on image contrast (such as visual SLAM, etc.). The contrast improvement effect of this method still needs to be improved.
[0004] Gao Yang and others from Chang'an University proposed a dark-light grayscale image enhancement method in their paper "Gao Yang, Wang Xingben, Xu Yonggui, et al. Robust visual-inertial SLAM algorithm under low-light conditions [J]. Combined Machine Tools and Automated Processing Technology, 2022 (6): 39-44." A multi-scale Retinex combined with adaptive gamma correction and contrast-limited histogram equalization (CLAHE) weighted post-processing method. When judging the quality of the original image, this method only considers the brightness mean of the original image as the self-judgment mechanism of this method, which cannot comprehensively measure the dark-light image. The dark-light image is not only composed of brightness, but also includes contrast, information entropy and other factors. At the same time, this method uses the fusion of three image processing algorithms, which increases the complexity and time consumption of the algorithm to a certain extent, and is limited in use in scenarios with high real-time requirements. Summary of the invention
[0005] In order to overcome the above problems existing in the prior art, the purpose of the present invention is to provide an adaptive dark light image enhancement method based on MSR (Multi-scale Retinex) and gamma correction post-processing using LUT (Look-Up-Table), which has the characteristics of comprehensive image quality self-judgment mechanism, significant improvement in the overall image quality and good real-time performance.
[0006] In order to achieve the above object, the technical solution adopted by the present invention is:
[0007] The method for adaptive dark light image enhancement using MSR and LUT gamma correction post-processing includes the following steps:
[0008] Step 1: Input image quality judgment;
[0009] 1) Calculate the contrast, brightness mean, and information entropy of the original image;
[0010] 2) Adaptive quality judgment: The contrast, brightness mean, and information entropy of the original image are brought into the evaluation function that is combined and calculated with the corresponding preset weights to calculate the evaluation value of the original image, and the image quality is judged according to the preset evaluation threshold;
[0011] If the evaluation value of the original image is higher than or equal to the evaluation threshold, the original image is judged to be of good quality and is directly output without enhancement processing;
[0012] Otherwise, proceed to step 2;
[0013] Step 2: Apply the multi-scale Retinex algorithm to the original image to be enhanced, decompose the original image into images of different scales, and perform Retinex enhancement processing on each scale image to retain the detail information of different scales. By adjusting the parameters of the Retinex algorithm, a balance between dynamic range compression, edge enhancement and color constancy is achieved;
[0014] Step 3: Apply gamma correction post-processing with LUT;
[0015] 1) Create an integral lookup table LUT for grayscale image gamma correction: According to the statistical characteristics of the 8-bit grayscale image, an integral lookup table LUT is constructed for subsequent gamma correction post-processing; the lookup table can reflect the distribution of image pixel values, provide a basis for subsequent nonlinear transformations, and significantly improve the efficiency of post-processing.
[0016] 2) Gamma correction using integral lookup table (LUT): The constructed integral lookup table is used to perform gamma correction on the multi-scale Retinex enhanced image. By adjusting the shape of the gamma curve, the contrast of the image is improved while maintaining color accuracy.
[0017] The specific implementation process of step 1) is as follows:
[0018] The brightness mean of the grayscale image is:
[0019]
[0020] Among them I k represents the image pixel value at the kth position of the grayscale image, and n represents the total number of pixels in the grayscale image;
[0021] Contrast value (and standard deviation) of grayscale image:
[0022]
[0023] Among them I k represents the image pixel value at the kth position of the grayscale image, n represents the total number of pixels in the grayscale image, and mean is the brightness mean of the grayscale image;
[0024] The calculation principle of the information entropy H of the grayscale image is as follows:
[0025] First, we need to determine the probability of each gray level in the image. This is done by counting the number of pixels at each gray level in the image and dividing it by the total number of pixels. The probability value is expressed as p(i), where i represents different gray levels.
[0026] Then, using the probability value, the information entropy of the grayscale image is calculated using the following formula:
[0027]
[0028] Among them, H represents information entropy, p(i) is the probability of gray level i appearing, k is a gray level corresponding to 0 to 255, and L represents the last pixel level in 0 to 255;
[0029] 2) in the step 1 is specifically:
[0030] Set an evaluation function to evaluate the image quality of grayscale images, and compare the evaluation results with L sp The threshold K determines whether the grayscale image needs to be enhanced. If the evaluation value of the grayscale image is less than the evaluation threshold, it is determined that the grayscale image needs to be enhanced and the subsequent image enhancement process is performed. Otherwise, the grayscale image is directly output without processing. The following is the evaluation function L sp set up:
[0031] L sp =w1*contrast+w2*mean+w3*H
[0032] w1+w2+w3=1
[0033] Among them, contrast, mean, and H correspond to the contrast value, brightness mean, and information entropy value of the grayscale image to be processed, respectively, and w1, w2, and w3 correspond to the weights of the contrast, brightness, and information entropy of the grayscale image to be processed, respectively.
[0034] The step 2 is specifically as follows:
[0035] The calculation process of multi-scale Retinex:
[0036]
[0037] Where N represents the number of scales. When N=1, it is single-scale Retinex enhancement.k is the weighting coefficient of the kth scale when weighting, which needs to satisfy:
[0038]
[0039] Pick R(x,y) is the reflection component (i.e. the enhanced image pixel value), I(x,y) is the pixel value of the original image, and F k (x, y) is the Gaussian filter function at the kth scale, that is:
[0040]
[0041] The image pixel value is the grayscale value of the grayscale image.
[0042] The specific steps of step 3) are:
[0043] (1) Initialize the gamma correction integral lookup table: Create a one-dimensional array corresponding to the number of bits of the original 8-bit grayscale image as the gamma correction integral lookup table. For an 8-bit grayscale image, the number of elements created is (2 8 -1) a one-dimensional array;
[0044] (2) Traverse the pixel values of the corresponding bits of the 8-bit grayscale image: For an 8-bit grayscale image, the corresponding pixel values to be traversed are 0 to 2 8 -1;
[0045] (3) Calculate the gamma correction value O(x, y) of the current pixel: For the current pixel, calculate its corresponding gamma correction value; specifically, assuming that the current pixel value is I(x, y), the corresponding gamma correction value O(x, y) can be calculated using the following gamma correction formula.
[0046]
[0047] Where ε is the compensation coefficient, which is usually taken as 0, and γ is the gamma coefficient;
[0048] (4) Update the gamma correction value: assign the calculated gamma correction value to the corresponding array position of the grayscale image gamma correction integral lookup table;
[0049] (5) Continue traversal: Continue traversing the next pixel of the grayscale image and repeat (2) and (3) until all pixels are traversed. For an 8-bit grayscale image, its original value corresponds to 0 to 255.
[0050] 2) in the step 3 is specifically:
[0051] After creating the gamma correction integral lookup table corresponding to the 8-bit grayscale image, gamma correction is applied to the target grayscale image according to the gamma correction integral lookup table. First, the number of bits of the target grayscale image is checked. If it is eight bits, continue. If it is not eight bits, convert the target grayscale image to 8 bits first. Next, receive the pixel value of the original grayscale image, and find the gamma correction value corresponding to the original pixel value according to the created gamma correction integral lookup table, so that the gamma correction can be completed quickly and accurately.
[0052] The method is applied to security monitoring, and at night or in low light conditions, the image quality of the monitoring video is enhanced to improve the monitoring effect and safety. The method is applied to medical imaging, and in medical imaging diagnosis, the contrast and detail information of the image are enhanced to help doctors identify the lesion area more accurately.
[0053] The method is used in aerospace, and in the aerospace field, the quality of satellite remote sensing images is enhanced to improve the extraction accuracy and efficiency of geographic information.
[0054] The method is used in consumer electronics, and in image processing of consumer electronic products such as mobile phones and cameras, the image quality is automatically adjusted to improve user experience.
[0055] Beneficial effects of the present invention:
[0056] 1. Through adaptive enhancement decision-making, unnecessary enhancement processing is avoided, the introduction of noise and distortion is reduced, and further impact on images that already have good effects is avoided, thereby improving the real-time performance of the system to a certain extent at the system level.
[0057] 2. Combining the multi-scale Retinex algorithm and the gamma correction post-processing based on the integral lookup table, on the one hand, the image contrast enhancement effect of the Retinex algorithm is optimized, and on the other hand, the brightness enhancement, detail enhancement and color correction of the dark light image are realized, further improving the visual quality of the image.
[0058] 3. By applying the integral lookup table for gamma correction, the processing speed and efficiency are improved while ensuring the accuracy of the correction effect.
[0059] 4. This method is dynamic and flexible, and can be intelligently adjusted according to the actual quality of the image, which is suitable for low-light image enhancement in different scenarios and needs.
[0060] 5. The MSR and adaptive dark light image enhancement method based on LUT gamma correction post-processing proposed in the present invention have broad application prospects and market demand, and are of great significance for improving image quality and visual experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 Schematic diagram of the algorithm flow of the present invention.
[0062] Figure 2 This is an over-enhanced image (the left one is the original image with good quality).
[0063] Figure 3 The original grayscale image is of poor quality.
[0064] Figure 4 This is the grayscale image after GC correction.
[0065] Figure 5 is the grayscale image after histogram equalization.
[0066] Figure 6 It is a grayscale image processed based on the multi-scale Retinex algorithm.
[0067] Figure 7 This is the image processed by the present invention. DETAILED DESCRIPTION
[0068] The present invention will be further described in detail below in conjunction with the accompanying drawings.
[0069] like Figure 1 As shown, MSR and the adaptive dark light image enhancement method using LUT gamma correction post-processing include
[0070] Step 1: Input image quality judgment;
[0071] 1). Calculate the contrast, brightness mean, and information entropy of the grayscale image.
[0072] The specific implementation process is as follows:
[0073] The brightness mean of the grayscale image is:
[0074]
[0075] Among them I k Represents the image pixel value at the kth position of the grayscale image, and n represents the total number of grayscale image pixels. The contrast of a grayscale image can be measured by the standard deviation of the image. The higher the image contrast, the larger the corresponding standard deviation, and vice versa.
[0076] Contrast value (and standard deviation) of grayscale image:
[0077]
[0078] Among them I k Represents the image pixel value at the kth position of the grayscale image, n represents the total number of pixels in the grayscale image, and mean is the brightness mean of the grayscale image.
[0079] The information entropy of a grayscale image reflects the uniformity of grayscale distribution and describes the amount of information in the image. The higher the information entropy, the higher the amount of information in the image, and vice versa.
[0080] The calculation principle of the information entropy H of the grayscale image is as follows:
[0081] First, we need to determine the probability of each gray level appearing in the image. This is done by counting the number of pixels at each gray level in the image and dividing by the total number of pixels. These probability values are usually expressed as p(i), where i represents a different gray level (between 0 and 255).
[0082] Then, using these probability values, the information entropy of the grayscale image is calculated using the following formula:
[0083]
[0084] Among them, H represents information entropy, p(i) is the probability of gray level i appearing, k is a gray level corresponding to 0 to 255, and L represents the last pixel level from 0 to 255. The above formula is actually the weighted sum of the negative logarithms of the probability of all gray levels appearing, and the weights are the probabilities themselves.
[0085] 2). Evaluation function L of grayscale image sp Setting and evaluation value calculation:
[0086] In order to comprehensively judge the image quality of a grayscale image, the present invention sets an evaluation function to evaluate the image quality of the grayscale image, and sp The threshold K determines whether the grayscale image needs to be enhanced in the future to avoid over-enhancement and extra time consumption. If the evaluation value of the grayscale image is less than the evaluation threshold, it is determined that the grayscale image needs to be enhanced and the subsequent image enhancement process is performed. Otherwise, the grayscale image is directly output without processing. The following is the evaluation function L sp set up:
[0087] L sp =w1*contrast+w2*mean+w3*H
[0088] w1+w2+w3=1
[0089] Where contrast, mean, and H correspond to the contrast value, brightness mean, and information entropy value of the grayscale image to be processed, respectively; w1, w2, and w3 correspond to the weights of the contrast, brightness, and information entropy of the grayscale image to be processed, respectively. In the present invention, after comprehensive consideration and a large number of experiments, w1 = 0.5, w2 = 0.3, w3 = 0.2, and L spThe threshold value K = 70 is the best. In each different method, it can also be changed, but its weight is determined according to the above formula.
[0090] Step 2. Perform multi-scale Retinex algorithm enhancement on the grayscale image to be enhanced. Decompose the original image into images of different scales, and perform Retinex enhancement processing on each scale. The Retinex algorithm is an image enhancement method based on color constancy, which can remove the influence of uneven illumination, improve the brightness and information richness of the image, and improve the contrast of the image to a certain extent. In the present invention, by performing Retinex enhancement on images of different scales, the detailed information of the image at different scales is retained to achieve a more comprehensive enhancement effect; the following is the operation process of multi-scale Retinex:
[0091]
[0092] Where N represents the number of scales. When N=1, it is a single-scale Retinex enhancement. In order to ensure that the multi-scale Retinex algorithm has the advantages of both high-scale and low-scale, the value of N is generally selected as 3. When the original image is filtered using three Gaussian filters of different scales, the effect is better. k is the weighting coefficient of the kth scale when weighting, which needs to satisfy:
[0093]
[0094] Usually take Experiments have shown that when the average is taken, it can be applied to a large number of low-light images, and the calculation is simple. Finally, R(x, y) is the reflection component (i.e. the enhanced image pixel value), I(x, y) is the pixel value of the original image, and F k (x, y) is the Gaussian filter function at the kth scale, that is:
[0095]
[0096] Through a large number of experiments, the present invention takes scale 1 σ1 = 0.5, scale 2 σ2 = 1.5, and scale 3 σ3 = 2.5 as the best, where the image pixel value is the grayscale value of the grayscale image. In each different method, it can also be changed, but its weight is determined according to the above formula.
[0097] Step 3. Apply gamma correction post-processing with LUT;
[0098] 1). Create a grayscale image gamma correction integral lookup table LUT:
[0099] The following are the specific steps to create it:
[0100] (1) Initialize the gamma correction integral lookup table: Create a one-dimensional array corresponding to the number of bits of the original 8-bit grayscale image as the gamma correction integral lookup table. For an 8-bit grayscale image, the number of elements created is (2 8 -1) of a one-dimensional array.
[0101] (2) Traverse the pixel values of the corresponding bits of the 8-bit grayscale image: For an 8-bit grayscale image, the corresponding pixel values to be traversed are 0 to 2 8 -1.
[0102] (3) Calculate the current pixel gamma correction value O(x, y): For the current pixel, calculate its corresponding gamma correction value. Specifically, assuming that the current pixel value is I(x, y), the corresponding gamma correction value O(x, y) can be calculated using the following gamma correction formula.
[0103]
[0104] Wherein ε is the compensation coefficient, which is generally 0, and γ is the gamma coefficient. In the present invention, after a large number of experiments, γ=1.5 is the best. In different situations, its value can also be adjusted appropriately.
[0105] (4) Update the gamma correction value: assign the calculated gamma correction value to the corresponding array position in the grayscale image gamma correction integral lookup table.
[0106] (5) Continue traversal: Continue traversing the next pixel of the grayscale image and repeat (2) and (3) until all pixels are traversed. For an 8-bit grayscale image, its original value corresponds to 0 to 255, so the output generally corresponds to 256 values.
[0107] 2) Gamma correction using an integral lookup table (LUT):
[0108] After creating the gamma correction integral lookup table corresponding to the 8-bit grayscale image, apply gamma correction to the target grayscale image according to the gamma correction integral lookup table. First, check the number of bits of the target grayscale image. If it is eight bits, continue. If it is not eight bits, convert the target grayscale image to 8 bits first. Next, receive the pixel value of the original grayscale image, and find the gamma correction value corresponding to the original pixel value according to the created gamma correction integral lookup table, so that gamma correction can be completed quickly and accurately.
[0109] 4. Output the comprehensively enhanced grayscale image.
[0110] In summary, the adaptive dark-light image enhancement method of the present invention using MSR and LUT gamma correction post-processing has the advantages of strong adaptability, good effect, high flexibility and high real-time performance, and has important application value for improving image quality under dark-light conditions.
[0111] Example:
[0112] In order to verify the effectiveness and superiority of the present invention, a large number of experiments and comparative tests were conducted. The following is a comprehensive analysis of the effects of the algorithm of the present invention from three aspects: the adaptability of the algorithm, the comparison of picture quality, and the gamma correction of the integral lookup table used and the original gamma correction effect.
[0113] 1. Analysis of algorithm adaptability (accuracy and time consumption)
[0114] 50 grayscale images with good lighting and 30 grayscale images with dim lighting were randomly mixed. These images were of the same size and format. They were input into the algorithm, and the total time consumption and the processing effect of each image were calculated compared with the case without the evaluation function. The final algorithm adaptability results are shown in Table 1.
[0115] Table 1 Algorithm adaptability results
[0116]
[0117] From the above table, it can be seen that the adaptive low-light image enhancement method described in the present invention can maintain the original grayscale image of good quality, effectively enhance the image of poor quality, and avoid the over-enhanced picture under dynamic low-light conditions; at the same time, due to its adaptability, the algorithm time consumption is reduced by 62.5% compared with the case without adding the evaluation function, which improves the real-time performance of the algorithm to a certain extent.
[0118] 2. Comparative analysis of the algorithm’s enhancement effect on low-quality grayscale images
[0119] 1) Visual effects
[0120] 2) The above grayscale image quality indicators
[0121] Table 2
[0122]
[0123] From the above results, it can be seen that compared with the traditional histogram equalization, gamma correction and multi-scale Retinex algorithm, the present invention can better retain the details and texture information of the image and avoid overexposure or underexposure. In particular, compared with the multi-scale Retinex algorithm method, due to excessively increasing the overall brightness of the grayscale image, the contrast decreases, so that the enhanced image loses some detail information. The present invention makes up for this defect and further improves the overall quality of the image.
[0124] 3. Time-consuming comparison between gamma correction using integral lookup table and original gamma correction (parameter settings and processed images are consistent)
[0125] The present invention applies gamma correction with an integral lookup table to speed up the contrast enhancement process while making up for the insufficient contrast enhancement defect based on the Retinex algorithm, so as to avoid affecting the real-time performance of the overall algorithm. The following Table 3 precisely describes the processing speed of gamma correction with an integral lookup table.
[0126] Table 3
[0127]
[0128]
[0129] According to the above time comparison, since the overall average unit time of the present invention is about 14ms, if the original gamma correction is directly used to improve the contrast, the real-time performance of the overall algorithm will be greatly reduced. The gamma correction time after using the integral lookup table only accounts for about 1 / 3 of the overall algorithm time. It hardly affects its real-time performance.
[0130] In summary, the experimental results show that the adaptive low-light image enhancement method described in the present invention can effectively and quickly enhance images of poor quality while maintaining the good quality of the original image.
[0131] like Figure 2 As shown, the left picture is the original picture with good quality, and the right picture is the picture after over-processing by multi-scale Retinex, that is, the picture after processing the original picture with good quality. It can be seen that the image with good original quality becomes more blurred after processing.
[0132] like Figure 3 As shown in the figure, the original poor quality dark grayscale image is visually darker overall. Table 2 gives the quantitative indicators corresponding to the original dark grayscale image, namely contrast, brightness mean and information entropy, which are 14.8397, 17.8399 and 1.9036 respectively.
[0133] like Figure 4 As shown in the figure, the overall quality of the grayscale image after GC correction has been improved visually. Table 2 shows the quantitative indicators of the grayscale image after GC correction, namely contrast, brightness mean and information entropy, which are 31.7226, 59.2469 and 3.5385 respectively.
[0134] like Figure 5 As shown in the figure, the brightness of the grayscale image after histogram equalization has been improved to a certain extent and the contrast has been improved significantly in terms of visual effect, but there are some image noise points. Table 2 gives the quantitative indicators corresponding to the grayscale image after histogram equalization, namely, contrast, brightness mean and information entropy, which are 73.2344, 131.099 and 1.9036 respectively.
[0135] like Figure 6 As shown in the figure, the grayscale image processed by the multi-scale Retinex algorithm has a significant improvement in image brightness and a certain improvement in contrast, but there are some blurry points. Table 2 gives the quantitative indicators of the grayscale image processed by the multi-scale Retinex algorithm, namely, contrast, brightness mean and information entropy, which are 73.8751, 155.622 and 6.3291 respectively.
[0136] like Figure 7 As shown, the grayscale image processed by the method of the present invention has a significantly improved overall image quality in terms of visual effect, and the blur points are significantly reduced compared to the original Retinex processing. Table 2 shows the quantitative indicators corresponding to the grayscale image processed by the method of the present invention, namely, contrast, brightness mean and information entropy, which are 86.4678, 144.106 and 6.6952 respectively.
Claims
1. An adaptive dark light image enhancement method using MSR and post-processing with LUT gamma correction, characterized in that: The steps include: Step 1: Input image quality judgment; 1) Calculate the contrast, brightness mean, and information entropy of the original image; 2) Adaptive quality judgment: The contrast, brightness mean, and information entropy of the original image are brought into the evaluation function that is combined and calculated with the corresponding preset weights to calculate the evaluation value of the original image, and the image quality is judged according to the preset evaluation threshold; If the evaluation value of the original image is higher than or equal to the evaluation threshold, the original image is judged to be of good quality and is directly output without enhancement processing; Otherwise, proceed to step 2; Step 2: Apply the multi-scale Retinex algorithm to the original image to be enhanced, decompose the original image into images of different scales, and perform Retinex enhancement processing on each scale image to retain the detail information of different scales. By adjusting the parameters of the Retinex algorithm, a balance between dynamic range compression, edge enhancement and color constancy is achieved; Step 3: Apply gamma correction post-processing with LUT; 1) Create an integral lookup table LUT for grayscale image gamma correction: According to the statistical characteristics of the 8-bit grayscale image, an integral lookup table LUT is constructed for subsequent gamma correction post-processing; 2) Gamma correction using integral lookup table (LUT): The constructed integral lookup table is used to perform gamma correction on the multi-scale Retinex enhanced image. By adjusting the shape of the gamma curve, the contrast of the image is improved while maintaining color accuracy.
2. The method for adaptive dark light image enhancement using MSR and post-processing with LUT gamma correction according to claim 1, characterized in that: The specific implementation process of step 1) is as follows: The brightness mean of the grayscale image is: Among them I k represents the image pixel value at the kth position of the grayscale image, and n represents the total number of pixels in the grayscale image; The contrast value of the grayscale image is contrast: Among them I k represents the image pixel value at the kth position of the grayscale image, n represents the total number of pixels in the grayscale image, and mean is the brightness mean of the grayscale image; The calculation principle of the information entropy H of the grayscale image is as follows: First, we need to determine the probability of each gray level in the image. This is done by counting the number of pixels at each gray level in the image and dividing it by the total number of pixels. The probability value is expressed as p(i), where i represents different gray levels. Then, using the probability value, the information entropy of the grayscale image is calculated using the following formula: Among them, H represents information entropy, p(i) is the probability of gray level i appearing, k is a gray level corresponding to 0 to 255, and L represents the last pixel level in 0 to 255.
3. The method for adaptive dark light image enhancement using MSR and LUT gamma correction post-processing according to claim 1, characterized in that: 2) in the step 1 is specifically: Set an evaluation function to evaluate the image quality of grayscale images, and compare the evaluation results with L sp The threshold K determines whether the grayscale image needs to be enhanced. If the evaluation value of the grayscale image is less than the evaluation threshold, it is determined that the grayscale image needs to be enhanced and the subsequent image enhancement process is performed. Otherwise, the grayscale image is directly output without processing. The following is the evaluation function L sp set up: L sp =w1*contrast+w2*mean+w3*H w1+w2+w3=1 Among them, contrast, mean, and H correspond to the contrast value, brightness mean, and information entropy value of the grayscale image to be processed, respectively, and w1, w2, and w3 correspond to the weights of the contrast, brightness, and information entropy of the grayscale image to be processed, respectively.
4. The method for adaptive dark light image enhancement using MSR and post-processing with LUT gamma correction according to claim 1, characterized in that: The step 2 is specifically as follows: The calculation process of multi-scale Retinex: Where N represents the number of scales. When N=1, it is single-scale Retinex enhancement. k is the weighting coefficient of the kth scale when weighting, which needs to satisfy: Pick R(x,y) is the reflection component, I(x,y) is the pixel value of the original image, and F k (x, y) is the Gaussian filter function at the kth scale, that is: The image pixel value is the grayscale value of the grayscale image.
5. The method for adaptive dark light image enhancement using MSR and post-processing with LUT gamma correction according to claim 1, characterized in that: The specific steps of step 3) are: (1) Initialize the gamma correction integral lookup table: Create a one-dimensional array corresponding to the number of bits of the original 8-bit grayscale image as the gamma correction integral lookup table. For an 8-bit grayscale image, the number of elements created is (2 8 -1) a one-dimensional array; (2) Traverse the pixel values of the corresponding bits of the 8-bit grayscale image: For an 8-bit grayscale image, the corresponding pixel values to be traversed are 0 to 2 8 -1; (3) Calculate the gamma correction value O(x, y) of the current pixel: For the current pixel, calculate its corresponding gamma correction value; specifically, assuming that the current pixel value is I(x, y), the corresponding gamma correction value O(x, y) can be calculated using the following gamma correction formula. Where ε is the compensation coefficient, which is usually taken as 0, and γ is the gamma coefficient; (4) Update the gamma correction value: assign the calculated gamma correction value to the corresponding array position of the grayscale image gamma correction integral lookup table; (5) Continue traversal: Continue traversing the next pixel of the grayscale image and repeat (2) and (3) until all pixels are traversed. For an 8-bit grayscale image, its original value corresponds to 0 to 255.
6. The method for adaptive dark light image enhancement using MSR and post-processing with LUT gamma correction according to claim 1, characterized in that: 2) in the step 3 is specifically: After creating the gamma correction integral lookup table corresponding to the 8-bit grayscale image, gamma correction is applied to the target grayscale image according to the gamma correction integral lookup table. First, the number of bits of the target grayscale image is checked. If it is eight bits, continue. If it is not eight bits, convert the target grayscale image to 8 bits first. Next, receive the pixel value of the original grayscale image, and find the gamma correction value corresponding to the original pixel value according to the created gamma correction integral lookup table, so that gamma correction can be completed quickly and accurately.
7. Application of the MSR according to any one of claims 1 to 6 and the adaptive dark light image enhancement method using LUT gamma correction post-processing, characterized in that: The method is applied to security monitoring, and improves monitoring effect and security by enhancing the image quality of monitoring video at night or in low-light environments.
8. Application of the MSR according to any one of claims 1 to 6 and the adaptive dark light image enhancement method using LUT gamma correction post-processing, characterized in that: The method is used for medical imaging. In medical imaging diagnosis, it helps doctors identify lesion areas more accurately by enhancing the contrast and detail information of images.
9. Application of the MSR according to any one of claims 1 to 6 and the adaptive dark light image enhancement method using LUT gamma correction post-processing, characterized in that: The method is used in aerospace, and in the aerospace field, the quality of satellite remote sensing images is enhanced to improve the extraction accuracy and efficiency of geographic information.
10. Application of the MSR according to any one of claims 1 to 6 and the adaptive dark light image enhancement method using LUT gamma correction post-processing, characterized in that: The method is used in consumer electronics, and in image processing of consumer electronic products such as mobile phones and cameras, the image quality is automatically adjusted to improve user experience.
Citation Information
Patent Citations
Gamma correction and smoothing filtering based image histogram equalization enhancing method
CN104700376A
Secondary histogram equalization image enhancement method and system of histogram correction
CN105608685A
Gamma curve generation method and device, equipment and medium
CN113570526A
Real-time low-illumination image enhancement method and system based on pixel-by-pixel gamma correction
CN116109509A
Method and device for enhancing image quality
CN116894793A
Cited By
Infrared image detail enhancement method and device for reducing edge blur
CN119295360A
Image quality monitoring method and system of vehicle-mounted image acquisition sensor
CN119919414A
Enhanced display method for low-light remote sensing image
CN122243754A
Method for enhancing and displaying low-light remote sensing images
CN122243754B
Remote sensing image enhancement method and system based on homomorphic filtering topographic correction
NL2041412A
