Self-adaptive illumination equalization method suitable for skin instrument image
The skin instrument image is preprocessed, local area division, light characteristic analysis, parameter adjustment and detail enhancement through the adaptive light equalization method, which solves the problems of loss of details, low efficiency and poor consistency in the uneven light image processing in the prior art, and achieves a more efficient and natural image processing effect.
Patent Information
- Application Number
- CN202411440644.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-03-28
AI Technical Summary
The prior art has problems such as loss of detail, low processing efficiency and poor global consistency when processing uneven light images.
An adaptive lighting equalization method is adopted, including image preprocessing, local area division, lighting characteristic analysis, parameter adjustment and detail enhancement. This method ensures light equalization and detail protection by processing the facial area and background area of the image respectively.
Improve image adaptability and detail retention, reduce processing complexity and calculation amount, improve processing efficiency, and achieve a more natural lighting transition.
Smart Images

Figure CN119722546A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image processing, and in particular relates to an adaptive illumination equalization method suitable for skin image analysis. Background Art
[0002] Image processing technology has been widely used in modern society, especially in the enhancement and optimization of digital images. With the popularity of devices such as smartphones and digital cameras, consumers have higher and higher demands for image quality. In the field of beauty, various skin meters have emerged one after another; however, the differences in conditions in the imaging environment of skin meter photos will cause uneven image quality. Common causes include background differences, light source differences, structural differences, differences in consumer face shapes, heavy shadows or uneven lighting. These problems will lead to inconsistent color space and insufficient contrast of the image, which will affect the accuracy of subsequent image analysis and recognition.
[0003] In the prior art, histogram equalization and adaptive histogram equalization (CLAHE) are commonly used image illumination equalization methods. The main principle of histogram equalization is to adjust the brightness value of each pixel in the image to make the brightness distribution more uniform, thereby improving the global contrast of the image. This method is effective in processing low-contrast images, but it is easy to cause the loss of image details when processing high-contrast images, especially in areas with obvious light-dark contrast. Adaptive histogram equalization (CLAHE) is an improvement on traditional histogram equalization. It reduces the possibility of image detail loss by dividing the image into multiple small blocks and performing histogram equalization on each small block. However, this method also has its limitations. First, the algorithm complexity of CLAHE is relatively high, especially when processing large-size images, the amount of calculation is huge and the processing efficiency is low. In addition, since this method processes the image in small blocks, the global consistency of the image may be affected in some cases.
[0004] In summary, the existing technology has some shortcomings when processing images with uneven illumination, mainly manifested in the following aspects: the global processing method leads to loss of details, and the local processing method affects efficiency due to high computational complexity. Therefore, a new adaptive illumination equalization algorithm is urgently needed. Summary of the invention
[0005] The object of the present invention is to provide an adaptive illumination equalization method suitable for skin image.
[0006] The technical solution of the present invention to solve the above technical problem is as follows: an adaptive illumination equalization method applicable to skin image, comprising:
[0007] Step 1, image preprocessing;
[0008] Step 2, dividing the image into local areas to obtain the image face area and the image background area;
[0009] Step 3: Analyze the illumination characteristics and calculate the illumination cumulative distribution function based on the illumination probability density function of the facial area of the image.
[0010] Step 4: parameter adjustment, calculating a balanced illumination intensity mapping table and using the balanced illumination intensity mapping table to perform balanced parameter adjustment on the facial area of the image;
[0011] Step 5: detail enhancement, mapping the equalized image facial area to the image background area.
[0012] The adaptive illumination equalization method for skin image according to the present invention as described above, preferably, in step 1, the image preprocessing includes image noise removal and image size adjustment.
[0013] The adaptive illumination equalization method for skin image according to the present invention as described above, preferably, in step 2, the facial region of the image is obtained using open source code from the Media Pipe public library.
[0014] The adaptive illumination equalization method for skin image according to the present invention as described above is preferably, in step 3, the illumination characteristics of the facial area of the image in the three RGB channels are respectively counted.
[0015] The adaptive illumination equalization method for skin image according to the present invention is preferably applicable to step 4, wherein the equalized illumination intensity mapping table is calculated according to the following formula:
[0016]
[0017] Where T(r k ). is the illumination intensity mapping table, r j is the illumination intensity of the pixel in the original image.
[0018] The beneficial effects of the above method of the present invention are: 1. Higher adaptability: the processing strategy can be automatically adjusted according to the actual lighting conditions of the image. 2. Reduced loss of detail information: through the detail enhancement mechanism, the detail information of the image is effectively protected. 3. High efficiency: the algorithm optimization design improves the processing speed and is suitable for real-time image processing.
[0019] The steps of the image adaptive illumination equalization method proposed in the present invention are not only interrelated, but also lay the foundation for subsequent processing, and ultimately achieve the improvement of the overall image quality.
[0020] First of all, image preprocessing, as the first step of the entire method, undertakes the key preliminary preparation work. By removing image noise and adjusting the image size, the preprocessing step ensures that subsequent processing will not be disturbed by noise or inconsistent size. The effective elimination of noise makes the image purer, laying a solid foundation for subsequent illumination equalization. And resizing standardizes the image size, allowing subsequent algorithms to run at a higher efficiency.
[0021] In the local area division step, the image is divided into the facial area and the background area. This step is the core of achieving illumination equalization. By accurately identifying the facial area, the method can focus on the part with more prominent illumination problems. At the same time, the division of the background area ensures the coordination of the overall image. The division of the local area provides accurate data support for the subsequent illumination characteristic analysis, ensuring that the facial and background areas can be processed separately.
[0022] The next step is to analyze the illumination characteristics of the facial area in detail. By independently analyzing the illumination characteristics of the three RGB channels, this method ensures illumination balance while retaining the color reproduction of the image. The calculation of the illumination cumulative distribution function provides a reliable basis for equalization adjustment, so that the illumination intensity of each pixel in the image can be reasonably mapped and adjusted.
[0023] The parameter adjustment step is the key to lighting equalization. The image facial area is equalized and adjusted through the lighting intensity mapping table calculated in the previous step. The equalized facial area not only improves clarity, but also enhances details, especially when dealing with scenes with uneven lighting. The result of parameter adjustment is a balanced lighting distribution of the entire image, eliminating overexposure and shadow problems.
[0024] The last step is detail enhancement and background synthesis of the facial area. The equalized facial area and the background area are smoothly transitioned to avoid the abrupt lighting contrast. The detail enhancement mechanism further ensures the preservation of subtle information in the image, especially the natural transition between the facial area and the background area, so that the final image has both high clarity and rich detail information. The processing of the background area also ensures the harmony of the entire image through appropriate lighting adjustment.
[0025] In summary, the various steps of the present invention not only independently realize specific functions, but also rely on each other and have significant synergistic effects. Local area division provides a basis for illumination characteristic analysis, and illumination characteristic analysis provides data support for parameter adjustment and detail enhancement. The synergistic effect of each step ensures that the present invention can flexibly deal with illumination problems in different areas under complex illumination conditions, and ultimately improves the overall quality of the image. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The above and / or other advantages of the present invention will become clearer and easier to understand through the detailed description made in conjunction with the following drawings, which are only exemplary and do not limit the present invention, wherein:
[0027] Figure 1 A schematic flow chart of an adaptive illumination equalization method for skin image analysis according to an embodiment of the present invention;
[0028] Figure 2 This is a schematic diagram of the RGB value distribution of an image before processing in an embodiment of the present invention;
[0029] Figure 3 The figure is a schematic diagram of the RGB value distribution of an image after processing in one embodiment of the present invention. DETAILED DESCRIPTION
[0030] Hereinafter, embodiments of an adaptive illumination equalization method applicable to a skin image of the present invention will be described with reference to the accompanying drawings.
[0031] The embodiments described herein are specific embodiments of the present invention, which are used to illustrate the concept of the present invention, are illustrative and exemplary, and should not be construed as limiting the embodiments of the present invention and the scope of the present invention. In addition to the embodiments described herein, those skilled in the art can also adopt other obvious technical solutions based on the claims and the contents disclosed in the specification of this application, including technical solutions that adopt any obvious replacement and modification of the embodiments described herein.
[0032] The drawings of this specification are schematic diagrams, which assist in explaining the concept of the present invention and schematically show the shapes of various parts and their mutual relationships. Please note that in order to clearly show the structures of various components of the embodiments of the present invention, the drawings are not drawn according to the same scale. The same reference numerals are used to represent the same parts.
[0033] The present invention proposes an adaptive illumination equalization method for skin image, which aims to solve the problems of detail loss, low processing efficiency and poor global consistency in the prior art when processing skin image in scenes with uneven illumination. The method of the present invention is particularly suitable for processing skin image containing facial areas, and improves the balance and visual effect of skin image under various illumination conditions. Figure 1 The present invention is a flowchart of an adaptive illumination equalization method for a skin analyzer image according to an embodiment of the present invention.
[0034] Step 1: Image Preprocessing
[0035] Image preprocessing is the first step of the present invention and is also the basis of the subsequent steps. In the image preprocessing process, the present invention includes two main sub-steps: image noise removal and image size adjustment.
[0036] Image noise removal: Image noise removal is crucial to improving the clarity of the image and the effect of subsequent processing. The source of the noise may be due to the limitations of the sensor or the environmental conditions during the image capture process. For noise removal, the present invention can adopt a variety of filtering algorithms, such as median filtering, Gaussian filtering, and bilateral filtering. Among them, Gaussian filtering is a common smoothing method, which is suitable for eliminating high-frequency noise, while median filtering can retain the edge information in the image and is better for removing salt and pepper noise. Through this step, the random noise in the image can be effectively filtered to ensure that the image is purer.
[0037] Image resizing: Another key step in preprocessing is image resizing. When processing images taken by different devices, the image sizes may be different, and direct processing may lead to inefficiency. Therefore, the present invention standardizes the image size to ensure that the equalization and lighting processing in the subsequent steps can be completed in a reasonable time. A common resizing method is proportional scaling, which prevents the image from being distorted or stretched during the scaling process by preserving the aspect ratio of the image.
[0038] Through the above-mentioned image preprocessing steps, the present invention lays a solid foundation for the subsequent illumination equalization process, ensuring that the image quality is not disturbed by noise or inappropriate size during the equalization process.
[0039] Step 2: Image local area division
[0040] After the image preprocessing is completed, the second step of the present invention is to perform local area segmentation on the image, that is, to divide the image into a facial area and a background area. This step uses the open source code of the Media Pipe public library to quickly and accurately identify and segment the facial area of the image.
[0041] Division of facial regions: The identification of facial regions is the focus of image processing, because the face is often the visual focus in the image, and lighting balance is particularly important here. By using open source code, the facial region in the image can be accurately located and the lighting processing of the region can be more detailed.
[0042] Division of background area: Relatively speaking, the lighting processing requirements of the background area are lower, but this does not mean that the processing of the background area can be ignored. The lighting balance processing of the background area still needs to consider the harmony of the overall image to avoid the abrupt contrast between the face and the background due to improper lighting processing. Therefore, the present invention adopts an appropriate equalization strategy when processing the background area to ensure that the background area and the facial area maintain a natural transition in lighting distribution.
[0043] By dividing the local area, different processing strategies can be formulated for different image areas to ensure that the processing effects of the face and background areas are optimal. This division also reduces the overall amount of calculation and improves processing efficiency, especially in the processing of large-size images.
[0044] Step 3: Lighting characteristics analysis
[0045] The illumination characteristic analysis is one of the key steps of the present invention. After completing the region division of the image, the present invention further performs illumination characteristic analysis on the facial region of the image. Specifically, in this step, the illumination cumulative distribution function is calculated based on the illumination probability density function of the facial region.
[0046] Independent analysis of RGB channels: During the illumination characteristic analysis process, the illumination characteristics of the facial area of the image in the three RGB channels are statistically analyzed separately. The RGB three-channel is the most commonly used color model, which decomposes color into three components: red, green, and blue. By independently analyzing each component, the present invention can understand the illumination distribution of the image in more detail. Traditional illumination equalization processing often targets the brightness of the image and ignores the independent characteristics of the color channel, which may lead to color distortion after equalization. By independently analyzing the RGB channels, it can be ensured that the color reproduction of the image is retained while performing illumination equalization.
[0047] Calculation of illumination cumulative distribution function: The illumination cumulative distribution function (CDF) is an important tool for measuring the illumination distribution of an image. By calculating the cumulative distribution function, the distribution state of illumination in the image can be understood, and a basis for subsequent equalization adjustment can be provided. By statistically analyzing the illumination intensity distribution of the facial area, the present invention can determine the intensity of illumination in the image and generate a cumulative distribution curve, which can be used as an important reference for equalization adjustment.
[0048] This detailed analysis of lighting characteristics can effectively improve the accuracy of lighting equalization and ensure that the image processing effect is more consistent under different lighting conditions.
[0049] Step 4: Lighting equalization and parameter adjustment
[0050] After completing the illumination characteristic analysis, the present invention enters the fourth step, that is, calculating an illumination intensity mapping table according to the result of the illumination cumulative distribution function, and using the mapping table to adjust the illumination equalization parameters.
[0051] Calculation of the light intensity mapping table: The calculation formula of the light intensity mapping table is as follows:
[0052]
[0053] Where T(r k ). is the illumination intensity mapping table, r j is the illumination intensity of the pixel in the original image.
[0054] Through this formula, the light intensity of the image can be mapped to a balanced range. Specifically, the light intensity mapping table can adjust the brightness value of each pixel in the image to make the brightness distribution more uniform, thereby improving the contrast and visual effect of the image. Figure 2 This is a schematic diagram of the RGB value distribution of an image before processing in an embodiment of the present invention; Figure 3 The figure is a schematic diagram of the RGB value distribution of an image after processing in one embodiment of the present invention.
[0055] Equalized lighting adjustment: After obtaining the lighting intensity mapping table, use the mapping table to adjust the parameters of the lighting equalization of the facial area of the image. The purpose of the equalization process is to make the lighting of the facial area more uniform and eliminate overexposure or heavy shadows. This equalization can not only improve the clarity of the facial area, but also make the lighting distribution of the entire image more harmonious and natural.
[0056] In practical applications, the effect of equalization adjustment is significant, especially in low-light or uneven-lighting scenes, which can significantly improve the visual quality of the image.
[0057] Step 5: Detail enhancement
[0058] Synthesis of the facial area and the background area. After completing the illumination equalization of the facial area, the last step is to synthesize the processed facial area of the image with the background area of the image. The purpose of synthesis is to retain more background information, ensure that the facial area and the background area can be naturally integrated in terms of illumination and detail, and form an image with uniform overall illumination.
[0059] Lighting transition between face and background: In the process of synthesizing face and background, the most important thing is to ensure the natural transition of lighting. If there is a significant difference between the lighting of the face area and the background area, it may cause unnatural lighting contrast in the image. Therefore, the present invention uses a lighting transition algorithm to make the lighting of the face area and the background area transition smoothly at the boundary to avoid abrupt light-dark contrast.
[0060] Detail processing of the background area: Although the lighting processing requirements of the background area are lower, in order to ensure the visual effect of the overall image, the lighting equalization processing of the background area must also take into account the overall image. Therefore, during the synthesis process, the lighting of the background area is appropriately adjusted to coordinate it with the lighting distribution of the facial area to avoid uneven lighting or local over-processing.
[0061] Through the natural synthesis of the face and the background, the final result is an image with balanced lighting and rich details.
[0062] The adaptive illumination equalization method for skin image proposed in the present invention has the following significant technical effects:
[0063] 1. Strong adaptability: The present invention can automatically adjust the processing strategy according to the lighting conditions of the skin image, especially in the division and processing of the facial area and the background area, and can flexibly cope with different lighting problems with strong adaptability.
[0064] 2. High detail retention: Through detail enhancement processing, the present invention effectively protects and enhances the detail information in the image, avoiding the detail loss problem commonly seen in traditional illumination equalization methods.
[0065] 3. High processing efficiency: Through area division and parameter optimization, the present invention greatly improves the processing efficiency while ensuring the processing quality, and is particularly suitable for real-time image processing needs.
[0066] 4. Natural lighting transition: The present invention ensures the lighting consistency of different areas in the image through the lighting transition processing between the face and the background, making the final image more natural.
[0067] The technical features disclosed above are not limited to the disclosed combinations with other features. Those skilled in the art may also make other combinations between the technical features according to the purpose of the invention to achieve the purpose of the invention.
Claims
1. An adaptive illumination equalization method for skin image, characterized in that: include: Step 1, image preprocessing; Step 2, dividing the image into local areas to obtain the image face area and the image background area; Step 3: Analyze the illumination characteristics and calculate the illumination cumulative distribution function based on the illumination probability density function of the facial area of the image. Step 4: parameter adjustment, calculating a balanced illumination intensity mapping table and using the balanced illumination intensity mapping table to perform balanced parameter adjustment on the facial area of the image; Step 5: detail enhancement, mapping the equalized image facial area to the image background area.
2. The method for adaptive illumination equalization of skin image according to claim 1, characterized in that: In step 1, the image preprocessing includes image noise removal and image size adjustment.
3. The adaptive illumination equalization method for skin image according to claim 1, characterized in that: In step 2, the face region of the image is obtained using open source code from the Media Pipe public library.
4. The adaptive illumination equalization method for skin image according to claim 1, characterized in that: In step 3, the illumination characteristics of the facial area of the image in the three RGB channels are counted respectively.
5. The method for adaptive illumination equalization of skin image according to claim 1, characterized in that: In step 4, the balanced light intensity mapping table is calculated according to the following formula: Where T(r k ) is the illumination intensity mapping table, r j is the illumination intensity of the pixel in the original image.