Multi-domain low-quality high-order grayscale image pseudo-color enhancement method for embedding interpretable domain knowledge
By embedding power dynamic adjustment and adaptive tone correction in the RGB color space, combined with the color balance correction of the CMY space, the problem of RGB color space not easy to dynamic adjustment and color imbalance in the prior art is solved, and better image visual contrast and display effect are achieved.
Patent Information
- Application Number
- CN202411563163.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-03-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the original RGB color space is not easy to adjust dynamically, the synthetic color layers are clearly large, and the enhanced images are prone to color imbalance.
Embed power dynamic adjustment on the basis of RGB color space for high-position chromatography mapping to reconstruct RGB space, adaptive tone correction based on perceived brightness interpretable domain knowledge, and finally color balance correction is performed in CMY space.
By dynamically adjusting the color distribution of RGB space, the balance of light and dark distribution is improved, the reliability of tone correction is ensured, the problem of color imbalance is solved, and the visual contrast and display effect of the image are significantly improved.
Smart Images

Figure CN119648595A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and in particular to a multi-domain low-quality high-order grayscale image pseudo-color enhancement method embedded with interpretable domain knowledge. Background Art
[0002] At present, most of the images formed by digital sensors are grayscale images with a grayscale of more than 8 bits (12bit, 14bit, 16bit). When displayed on ordinary monitors, there is serious information loss, and the grayscale levels that the human eye can distinguish are very limited. Therefore, high-order grayscale images need to be processed before they can be put into actual production research.
[0003] In order to improve the visual resolution and contrast of grayscale images, a pseudo-color processing method is usually used to process black and white grayscale images or multi-band images into color images. "CN117078571A" discloses "A method for pseudo-color enhancement of fire point combustion visualization based on satellite remote sensing monitoring", which uses multi-spectral band information of the acquired area and adopts different synthesis schemes to synthesize color pictures. "CN113643194B" discloses "A method for pseudo-color display of high grayscale weld film images", and a pseudo-color enhancement method for high grayscale weld film images is designed using RGB color space. The above method has the following shortcomings: 1. The original RGB color space is not easy to adjust dynamically. 2. The RGB space is prone to overexposure and underexposure, and the color levels are too distinct and the gradient is poor. 3. The enhanced image is prone to color imbalance.
[0004] "CN1877326B" discloses "A method for pseudo-color enhancement of metallographic microstructures based on digital image technology", designs a matching relationship model of metal phase grayscale ~ pseudo-color, and compiles it into a metallographic pseudo-color system running on a computer; inputs the grayscale digital image of the metallographic microstructure into the computer, and selects whether to perform grayscale histogram equalization processing depending on the quality of the grayscale contrast of the original image; performs pseudo-color conversion on the metallographic image with appropriate grayscale contrast, matches the different grayscale levels of each metal phase in the microstructure to the color space to become different pseudo-colors with large color difference, forms and displays pseudo-color digital images to distinguish and identify the metallographic microstructure. However, this method requires contrast distinction of the input grayscale image, and the grayscale histogram equalization processing method used will lose a lot of grayscale information, and has poor adaptability to application fields with strict grayscale requirements. The final synthesized color level is clear and large, which is not suitable for images imaged by digital sensors. Summary of the invention
[0005] The present invention proposes a multi-domain low-quality high-order grayscale image pseudo-color enhancement method that embeds interpretable domain knowledge to solve the problems in the prior art that the original RGB color space is difficult to dynamically adjust, the synthesized color levels are distinct and large, and the enhanced image is prone to color imbalance.
[0006] To achieve the above object, the technical solution adopted by the present invention is: a multi-domain low-quality high-order grayscale image pseudo-color enhancement method embedded with interpretable domain knowledge, comprising the following steps:
[0007] Step 1: Based on the RGB color space, embed the power dynamic adjustment to perform high-order color spectrum mapping to reconstruct the RGB space;
[0008] Step 2: Based on the reconstructed RGB space, adaptive hue correction is performed according to the interpretable domain knowledge of perceived brightness to obtain a corrected RGB space;
[0009] Step 3: Perform color balance correction based on the CMY space for the RGB space after correction.
[0010] Furthermore, the design process of the above step 1 includes:
[0011] 1.1 The design bit depth quantization formula is:
[0012]
[0013] Among them, I is the input image matrix, I 1 is the quantized image matrix, I bit Represents the number of bits of the input image, N miamax (I) is a 16-bit extreme value mapping function.
[0014] 1.2, the power function is introduced into the RGB color space, and the high-order color spectrum mapping output function embedded in the power is shown in formula (2)
[0015]
[0016] Wherein, α is the introduced power coefficient, r, g, b are the high-order chromatogram mapping functions reconstructed by the present invention, and the calculation is shown in formula (3) (r = 0), and R, G, B are the outputs after power processing.
[0017]
[0018] 1.3 Design a power-adaptive dynamic adjustment function based on the inherent attributes of the original image and interpretable domain knowledge, as shown in formula (4)
[0019]
[0020] Among them, input Represents the image matrix I 1 The prior mean brightness, alpha represents the amplitude adjustment factor, y α represents the calculated α.
[0021] Furthermore, the adaptive tone correction process in the above step 2 includes the following steps:
[0022] 2.1 Taking the perceived brightness mean of the three RGB channels as interpretable domain knowledge;
[0023] 2.2 Use adaptive gamma RGB tone correction to dynamically expand high and low gray levels;
[0024] 2.3 Construct an adaptive tone correction formula.
[0025] Furthermore, in the above step 2.1, the calculation formula for the average perceived brightness of the quantized RGB three channels is:
[0026]
[0027] Furthermore, in the above step 2.3, the adaptive tone correction formula is shown as (7)
[0028]
[0029] Among them, the input x = PL represents the image matrix I 2 The average perceived brightness of {B,G,R}, alpha represents the amplitude adjustment factor, y γ Indicates the calculated γ.
[0030] Furthermore, the color balance correction formula in step 3 above is as follows:
[0031]
[0032] Where RMS is the RMS pixel brightness of a single channel, T is the threshold of RMS pixel brightness, and η is the color compression correction factor.
[0033] Compared with the prior art, the present invention has the following beneficial effects:
[0034] 1. The present invention introduces the power function into the high-order color spectrum mapping function, and uses the power to dynamically adjust the color distribution of the RGB space, which can dynamically compensate for the unclear distribution of light and dark in the RGB space. At the same time, in view of the problem of adaptive adjustment of the power, an adaptive power function based on the interpretable domain knowledge of the mean brightness of the original high grayscale image is designed, which further improves the distribution of light and dark in the RGB space on the basis of dynamic adjustment.
[0035] 2. The present invention uses the perceived brightness mean of the three RGB channels as interpretable domain knowledge, performs RGB tone correction processing with adaptive Gamma, and dynamically expands high and low gray levels, thereby ensuring the reliability of tone correction and solving the problems of dimness and overbrightness in RGB space color distribution.
[0036] 3. In order to ensure the balance of enhanced colors, the present invention performs dynamic color balance correction on the M component and the Y component in the CMY color space, corrects the M component, and performs color compensation correction on the Y component when the mean brightness of the Y component exceeds a certain threshold.
[0037] 4. The present invention firstly utilizes the power function and domain knowledge to dynamically compensate for the brightness and darkness distribution in the RGB space, then performs adaptive Gamma RGB tone correction processing, and finally performs dynamic color balance correction on the M component and the Y component in the CMY color space, which can better preserve the detail texture information of the original image and greatly improve the display effect.
[0038] 5 The present invention is aimed at multimodal high-order grayscale images, and can make the enhanced image color harmonious, without obvious overexposure or underexposure, and the enhancement effect is more coordinated. The processing result conforms to human visual perception and is more suitable for human eye observation. The method constructed by the present invention has stronger adaptability and can be applied to the enhancement of high-grayscale images produced in multiple fields such as X-ray films, aerospace remote sensing images, autonomous driving infrared images, etc. produced in the industrial manufacturing field. It has achieved a balanced height in indicators and visual effects, and can adapt to the enhancement processing of various brightness images, with better robustness and stronger universality. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is the overall flow chart of the method of the present invention;
[0040] Figure 2 It is a power adaptive dynamic adjustment function curve graph;
[0041] Figure 3 is a graph of adaptive tone correction function curve;
[0042] Figure 4 The following are the results of image processing in various fields. DETAILED DESCRIPTION
[0043] The following is a clear and complete description of the technical solution of the present invention in combination with the embodiments of the present invention and the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] Figure 1 The overall flow chart of the present invention is shown. The method proposes a pseudo-color enhancement method for multi-domain low-quality high-order grayscale images embedded with interpretable domain knowledge, which mainly includes three key steps, namely, a high-order color spectrum mapping module embedded with power dynamic adjustment, an adaptive tone correction module based on interpretable domain knowledge of perceived brightness, and a color balance correction method for CMY space. Specifically, the following steps are included:
[0045] Step 1: Based on the RGB color space, embed the power dynamic adjustment to perform high-order color spectrum mapping and reconstruct the RGB space;
[0046] 1.1, Design bit depth quantization formula:
[0047] Normalize the image data of any bit depth to facilitate the subsequent high-bit encoding process. In this embodiment, when the bit number is not 12 or 16 bits, 8 bits, 14 bits, and 24 bits (RGB) are converted to single-channel 16 bits, and 16-bit extreme value mapping is performed.
[0048] The bit depth quantization calculation formula is shown in (1):
[0049]
[0050] Among them, I is the input image matrix, I 1 is the quantized image matrix, I bit Represents the number of bits of the input image, N miamax (I) is a 16-bit extreme value mapping function.
[0051] 1.2, the power function is introduced into the RGB color space, and the high-order color spectrum mapping function embedded in the power is shown in formula (2).
[0052]
[0053] Wherein, α is the introduced power coefficient. The present invention aims to realize the chromatogram mapping of high grayscale images with the simplest mapping function, that is, r, g, b are the high-order chromatogram mapping functions reconstructed by the present invention, and the calculation is shown in formula (3) (r = 0), R, G, B are the outputs after power processing, I 2 {B, G, R} is the high-order color spectrum mapping output function of the embedded power.
[0054]
[0055] 1.3 Design a power-adaptive dynamic adjustment function based on the inherent attributes of the original image and interpretable domain knowledge, as shown in formula (4), and its function curve is shown in Figure 2 , you can see that different operations can be performed on light and dark areas respectively.
[0056]
[0057] Among them, input Represents the image matrix I 1 The prior mean brightness, alpha represents the amplitude adjustment factor, y α represents the calculated α.
[0058] Step 2: Based on the reconstructed RGB space, adaptive hue correction is performed according to the interpretable domain knowledge of perceived brightness to obtain the corrected RGB space:
[0059] In this embodiment, the perceived brightness mean of the RGB three channels is first used as interpretable domain knowledge, and then the RGB tone correction of adaptive Gamma is used to dynamically expand the high and low gray levels, and finally an adaptive tone correction formula is constructed.
[0060] The formula for the average perceived brightness of the RGB three channels is:
[0061]
[0062] The RGB tone correction formula of the adaptive Gamma is:
[0063]
[0064] The adaptive tone correction formula is shown in (7), and its function curve is shown in Figure 3 , we can see that different input parameters have different effects on its adjustment.
[0065]
[0066] Among them, the input x = PL represents the image matrix I 2 The average perceived brightness of {B,G,R}, alpha represents the amplitude adjustment factor, y γ Indicates the calculated γ.
[0067] Step 3: Perform color balance correction based on the CMY space for the corrected RGB space:
[0068] The present invention uses the CMY (Cyan, Magenta, Yellow) space complementary to the RGB space for color balance processing. The high-level color spectrum constructed by the present invention is in the CMY space, and its information is mainly distributed in the M component, the Y component presents dim information, and the C component generally presents white. Therefore, only the M component needs to be corrected, and when the mean brightness of the Y component exceeds a certain threshold, the color compensation correction of the Y component is performed. The formula for color balance correction is shown in Formula 8.
[0069]
[0070] Where RMS is the RMS pixel brightness of a single channel, T is the threshold of RMS pixel brightness, and η is the color compression correction factor.
[0071] The method designed by the present invention is implemented and tested in Windows 11 operating system, AMD Ryzen 5 5600H with Radeon Graphics 3.30GHz 16.0 GB memory computer, using Visual Studio 2015 to configure Opencv3.1, C++ programming, and the test results are as follows: Figure 4 As shown, it can be clearly seen that the processing result of the method of the present invention is clearer and the visual contrast is better.
[0072] The above comprehensive analysis of all image enhancement effects shows that the enhancement effects of H-JET, H-HSV and H-RB methods are uneven, which mainly depends on the reasonable selection of thresholds. The H-HOTM method has a better enhancement effect only on some films. In addition to the dim enhancement effect in the lower grayscale area, the HIS method only produces local over-brightness in some images, but is not suitable for high-order grayscale images. The adaptive high-order grayscale image pseudo-color enhancement method designed by the present invention can adapt to high-grayscale images produced in multiple fields, and has stronger robustness and adaptability.
[0073] By observing and drawing the enhanced image, the method constructed by the present invention can enhance the low-contrast image to medium contrast, visually increase the image brightness, and avoid the phenomenon of being too dark and unclear. At the same time, the highlight area can be further compressed and the dim area can be expanded, so the enhanced grayscale is smoother. On the contrary, H-JET, H-HOTM, and H-HIS have too distinct levels, and the highlight area displays too high brightness, which is prone to visual overexposure. The adaptive high-order grayscale image pseudo-color enhancement method constructed by the present invention has a slow gradient after enhancement, and no color mutation occurs. Figure 4 The visual effect analysis further verifies the effectiveness and feasibility of the method of the present invention, and it performs better in image enhancement in multiple fields.
[0074] The results of the quantitative analysis experiment are shown in Table 1. The method designed by the present invention has better visual contrast, especially the IL-NIQE index is the best. Through the analysis of the Brightness index, it can be seen that the input is a medium to high brightness image. Looking at the visual effect of the image alone, the image processed by the present invention is darker than H-HIS and H-HOTM, but the detail information is more obvious. Among them, the processing results of H-HIS and H-HOTM have local overexposure, but the image processed by the method of the present invention does not have overexposure and underexposure. Combined with the analysis of the quantitative index Table 1, the method constructed by the present invention has achieved better performance indicators in the high grayscale image enhancement produced in multiple fields, and has reached a balanced height in indicators and visual effects. It can adapt to the enhancement processing of various brightness images, and has better robustness and stronger universality.
[0075] Table 1 Results of quantitative experimental tests on high grayscale pseudo-color images in various fields
[0076]
[0077]
[0078] The above is an explanation of the specific implementation of the present invention, rather than a limitation of the present invention. Those skilled in the relevant technical field can also make various equivalent technical solutions without departing from the scope of the present invention, so all equivalent technical solutions should be included in the patent protection scope of the present invention.
Claims
1. A pseudo-color enhancement method for multi-domain low-quality high-order grayscale images embedded with interpretable domain knowledge, characterized by: The following steps are involved: Step 1: Based on the RGB color space, embed the power dynamic adjustment to perform high-order color spectrum mapping to reconstruct the RGB space; Step 2: Based on the reconstructed RGB space, adaptive hue correction is performed according to the interpretable domain knowledge of perceived brightness to obtain a corrected RGB space; Step 3: Perform color balance correction based on the CMY space for the RGB space after correction.
2. The method for pseudo-color enhancement of multi-domain low-quality high-order grayscale images embedded with interpretable domain knowledge according to claim 1, characterized in that: The design process of step one includes: 1.1 The design bit depth quantization formula is: Among them, I is the input image matrix, I1 is the quantized image matrix, and I bit Indicates the number of bits of the input image, N miamax (I) is a 16-bit extreme value mapping function; 1.2, the power function is introduced into the RGB color space, and the high-order color spectrum mapping output function embedded in the power is shown in formula (2) Wherein, α is the introduced power coefficient, r, g, b are the high-order chromatogram mapping functions reconstructed by the present invention, and the calculation is shown in formula (3) (r = 0), and R, G, B are the outputs after power processing. 1.3 Design a power-adaptive dynamic adjustment function based on the inherent attributes of the original image and interpretable domain knowledge, as shown in formula (4) Among them, input represents the prior mean brightness of the image matrix I1, alpha represents the amplitude adjustment factor, and y α represents the calculated α.
3. The method for pseudo-color enhancement of multi-domain low-quality high-order grayscale images embedded with interpretable domain knowledge according to claim 2, characterized in that: The adaptive tone correction process in step 2 includes the following steps: 2.1 Taking the perceived brightness mean of the three RGB channels as interpretable domain knowledge; 2.2 Use adaptive gamma RGB tone correction to dynamically expand high and low gray levels; 2.3 Construct an adaptive tone correction formula.
4. The method for pseudo-color enhancement of multi-domain low-quality high-order grayscale images embedded with interpretable domain knowledge according to claim 3, characterized in that: In step 2.1, the calculation formula for quantizing the perceived brightness mean of the three RGB channels is:
5. The method for pseudo-color enhancement of multi-domain low-quality high-order grayscale images embedded with interpretable domain knowledge according to claim 3, characterized in that: In step 2.3, the adaptive tone correction formula is shown in (7): Among them, the input x = PL represents the perceived brightness mean of the image matrix I2{B, G, R}, alpha represents the amplitude adjustment factor, and y γ Indicates the calculated γ.
6. A method for pseudo-color enhancement of multi-domain low-quality high-order grayscale images embedded with interpretable domain knowledge according to claim 4 or 5, characterized in that: The color balance correction formula in step 3 is as follows Where RMS is the RMS pixel brightness of a single channel, T is the threshold of RMS pixel brightness, and η is the color compression correction factor.
Citation Information
Patent Citations
Pseudo-color display method for high grayscale weld film images
CN113643194B
Fire point combustion visualization pseudo-color enhancement method based on satellite remote sensing monitoring
CN117078571A
Method for accomplishing pseudo color reinforced metallographic microstructure based on digital image technology
CN1877326B
Self-adaptive low-illuminance or non-uniform-brightness image enhancement method
CN104156921A
Nonlinear transformation method suitable for remote sensing image bit descending enhancement display
CN108846811A