Regional exposure compensation method and compensation system based on machine learning

Through the machine learning-based regional exposure compensation method, through semantic segmentation and feature extraction, efficient and accurate compensation of image exposure is achieved, and the problem of insufficient brightness, contrast and color saturation caused by complex light conditions in the prior art is solved. Improves the visual effect of the image.

CN118984427AInactive Publication Date: 2024-11-19SICHUAN NATIONAL INNOVATION VISION UHD VIDEO TECHNOLOGY CO LTD

Patent Information

Application Number
CN202410927511.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-11-19
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

During the shooting process, the existing technology has insufficient brightness, contrast and color saturation of the photo during the shooting process, which affects the flexibility of visual effects and post-processing. Manual adjustment of exposure parameters is complicated and difficult to popularize. .

Method used

Using machine learning-based regional exposure compensation method, through semantic segmentation and feature extraction, the pre-trained compensation value calculation model is used to personalize the brightness, contrast and color saturation of the image, achieving efficient and accurate compensation of image exposure.

Benefits of technology

It significantly improves the visual effect of the image, achieves efficient and accurate compensation for image exposure, ensures that the overall image is more natural and harmonious, and adapts to different lighting conditions and the needs of the subjects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118984427A_ABST
    Figure CN118984427A_ABST
Patent Text Reader

Abstract

The invention provides a regional exposure compensation method and compensation system based on machine learning, and belongs to the technical field of image processing, an image is segmented by using semantic features to obtain a plurality of regions with clear semantics, and the regional processing mode can fully consider the difference of image contents, so that the accuracy of image processing is improved. An accurate target area is provided for a subsequent compensation strategy; image features such as brightness, contrast and color saturation of each semantic region are extracted and input into a pre-trained compensation value calculation model for forward propagation calculation, a personalized compensation value for each region is obtained, and automatic learning and adaptation to exposure compensation requirements of different illumination conditions and shot objects can be realized; and finally, based on the calculated compensation value, the brightness, contrast and color saturation of the corresponding semantic region are finely adjusted, so that the whole image is more natural and harmonious, efficient and accurate compensation of image exposure is realized, and the visual effect of the image is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a regional exposure compensation method and compensation system based on machine learning. Background Art

[0002] With the rapid development of digital imaging technology, digital cameras, smart phones and other photographic devices have become widely popular and have become important tools for people to record their lives and capture beautiful moments. However, in the actual shooting process, due to the complex and changeable lighting conditions, the wide variety of shooting objects and the limitations of the camera's automatic exposure algorithm, the photos taken often have deficiencies in brightness, contrast and color saturation, which affects the visual effect of the photos and the flexibility of post-processing.

[0003] Traditional exposure compensation methods mostly rely on the camera's built-in algorithm to improve the overall brightness of the image by adjusting the exposure parameters globally. However, this method often fails to take into account the specific needs of different areas in the image, and is prone to overexposure or underexposure, especially when there are areas with strong light-dark contrast in the image. In addition, although manual adjustment of exposure parameters can provide more precise control, the operation is complicated and depends on the photographer's experience and skills, making it difficult to popularize and automate.

[0004] Therefore, it is necessary to provide a regional exposure compensation method and compensation system based on machine learning to solve the above technical problems. Summary of the invention

[0005] In order to solve the above technical problems, the present invention provides a regional exposure compensation method and compensation system based on machine learning, which realizes efficient and accurate compensation for image exposure through precise segmentation, intelligent calculation and regional processing, and significantly improves the visual effect of the image.

[0006] The present invention provides a regional exposure compensation method based on machine learning, and the compensation method comprises the following steps:

[0007] S1: Acquire an image to be compensated, and segment the image to be compensated based on semantic features to obtain at least one semantic region;

[0008] S2: extracting regional image features of the at least one semantic region, wherein the regional image features include brightness, contrast, and color saturation;

[0009] S3: Input the regional image features extracted from each semantic region into the pre-trained compensation value calculation model one by one for forward propagation calculation to obtain the compensation value corresponding to each semantic region;

[0010] S4: adjusting the brightness, contrast and color saturation of the corresponding semantic area based on the compensation value;

[0011] S5: Fuse all adjusted semantic regions and output the final compensated image.

[0012] Preferably, step S1 specifically includes:

[0013] S101: preprocessing the acquired image to be compensated;

[0014] S102: extracting semantic features from the preprocessed image to be compensated by inputting a pre-trained semantic segmentation model, and classifying the image according to the extracted semantic features to obtain a semantic category of each pixel;

[0015] S103: Segment the image to be compensated into a plurality of semantic regions according to the semantic category of each pixel, and each semantic region is defined with a semantic category.

[0016] Preferably, step S2 specifically includes:

[0017] S201: averaging the brightness values ​​of all pixels in each semantic area, and using the average brightness as the brightness of the semantic area;

[0018] S202: Calculate the standard deviation of the brightness of all pixels in each semantic area and use it as the contrast of the semantic area;

[0019] S203: converting all pixel values ​​in each semantic area into the HSV color space, and calculating the average value of the saturation component as the color saturation of the semantic area;

[0020] S204: Create a feature list for each semantic region, and store the extracted brightness, contrast, and color saturation in the feature list.

[0021] Preferably, in step S3, the training process of the compensation value calculation model includes:

[0022] Collecting and annotating an image training set, wherein the training images in the image training set are annotated with sample semantic regions and corresponding sample compensation values;

[0023] The brightness, contrast and color saturation of the sample semantic area are extracted from each training image in the image training set, and input into the compensation value calculation model based on the convolutional neural network for back propagation to minimize the error between the predicted compensation value and the sample compensation value, and finally obtain a trained compensation value calculation model.

[0024] Preferably, step S3 specifically comprises:

[0025] Brightness, contrast and color saturation are extracted from the feature list corresponding to the semantic area and input into the trained compensation value calculation model to perform forward propagation, and the compensation value corresponding to each semantic area is output, wherein the compensation value includes brightness compensation value, contrast compensation value and color saturation compensation value.

[0026] Preferably, step S4 specifically includes:

[0027] S401: performing brightness compensation on a corresponding semantic area based on the brightness compensation value, and updating the brightness of each pixel in the semantic area according to the compensated brightness;

[0028] S402: performing contrast compensation on the corresponding semantic area based on the contrast compensation value, and updating the contrast of each pixel in the semantic area according to the compensated contrast;

[0029] S403: Perform color saturation compensation on the corresponding semantic area based on the color saturation, and update the color saturation of each pixel in the semantic area according to the compensated color saturation.

[0030] Preferably, step S5 specifically includes:

[0031] S501: using an edge detection algorithm to find the boundaries of adjacent semantic areas;

[0032] S502: For pixels located on the boundary, weighted average is used to calculate attribute values ​​including brightness, contrast and color saturation, wherein the calculation formula is:

[0033]

[0034] in, and are the adjusted attribute values ​​of pixel p in semantic region R1 and semantic region R2, ω1 and ω2 are the weights calculated based on the distance between pixel p and the boundary, and C p ′ The attribute value is calculated by weighted average;

[0035] S503: Use the calculated attribute value to update the original attribute value of each pixel located on the boundary.

[0036] The present invention also provides a regional exposure compensation system based on machine learning, which is applied to a regional exposure compensation method based on machine learning. The compensation system includes:

[0037] A segmentation module, used for acquiring an image to be compensated, and segmenting the image to be compensated based on semantic features to obtain at least one semantic region;

[0038] A feature extraction module, used to extract regional image features of the at least one semantic region, wherein the regional image features include brightness, contrast and color saturation;

[0039] A compensation value calculation module is used to input the regional image features extracted from each semantic region into a pre-trained compensation value calculation model one by one for forward propagation calculation to obtain a compensation value corresponding to each semantic region;

[0040] An adjustment module, configured to adjust the brightness, contrast and color saturation of the corresponding semantic area based on the compensation value;

[0041] The fusion module is used to fuse all adjusted semantic regions and output the final compensated image.

[0042] Compared with the related art, the regional exposure compensation method and compensation system based on machine learning provided by the present invention have the following beneficial effects:

[0043] The present invention uses semantic features to segment images to obtain multiple regions with clear semantics. This regional processing method can fully consider the differences in image content and provide accurate target areas for subsequent compensation strategies; then, by extracting image features such as brightness, contrast and color saturation of each semantic region, and inputting a pre-trained compensation value calculation model for forward propagation calculation, a personalized compensation value for each region is obtained, which can automatically learn and adapt to different lighting conditions and exposure compensation requirements of the photographed objects; finally, based on the calculated compensation value, the brightness, contrast and color saturation of the corresponding semantic region are finely adjusted to make the overall image more natural and harmonious. The present invention realizes efficient and accurate compensation for image exposure and significantly improves the visual effect of the image. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 A flow chart of a regional exposure compensation method based on machine learning provided by the present invention;

[0045] Figure 2 A module structure diagram of a regional exposure compensation system based on machine learning provided by the present invention. DETAILED DESCRIPTION

[0046] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only the parts related to the present invention, rather than all structures, are shown in the accompanying drawings. In addition, the embodiments of the present invention and the features in the embodiments may be combined with each other without conflict.

[0047] It should also be noted that, for ease of description, only the part relevant to the present invention but not all the content is shown in the accompanying drawings. It should be mentioned before discussing the exemplary embodiments in more detail that some exemplary embodiments are described as the processing or method described as a flow chart. Although the flow chart describes each operation (or step) as being processed sequentially, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. When its operation is completed, the processing can be terminated, but it can also have additional steps not included in the accompanying drawings. The processing can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.

[0048] Embodiment 1

[0049] The present invention provides a regional exposure compensation method based on machine learning, referring to Figure 1 As shown, the compensation method includes the following steps:

[0050] S1: Acquire an image to be compensated, and segment the image to be compensated based on semantic features to obtain at least one semantic region.

[0051] In this embodiment, a high-resolution image sensor or camera is first used to acquire an image to be processed. The reason for choosing high resolution is to ensure that the details in the image are rich enough to facilitate subsequent semantic segmentation and exposure compensation. Then a pre-trained convolutional neural network is applied for semantic segmentation. Convolutional neural networks are chosen because they can automatically learn and extract semantic features from images. Compared with traditional image processing algorithms, they have higher segmentation accuracy and robustness in complex scenes, and can accurately distinguish different objects or scenes in the image, such as the sky, buildings, people, vehicles, etc., to provide accurate area division for subsequent exposure compensation.

[0052] S2: Extracting regional image features of the at least one semantic region, wherein the regional image features include brightness, contrast, and color saturation.

[0053] In this embodiment, for each segmented semantic area, the average brightness, contrast and saturation average in the HSV color space are calculated. These features are selected based on their important impact on the visual effect of the image. Among them, brightness and contrast directly determine the brightness and layering of the image to be compensated, while saturation affects the vividness of the color. The purpose of calculating these features is to quantify the exposure status of each semantic area and provide data support for the model, so that it can more accurately calculate the compensation value required for each area, thereby achieving refined exposure adjustment in subsequent steps.

[0054] S3: The regional image features extracted from each semantic region are input into the pre-trained compensation value calculation model one by one for forward propagation calculation to obtain the compensation value corresponding to each semantic region.

[0055] In this embodiment, the extracted regional image features are input into a pre-trained convolutional neural network model, which is trained using a large amount of labeled data and can predict the compensation values ​​of brightness, contrast, and saturation required for each semantic region based on the input features. The convolutional neural network model can automatically learn the complex relationship between features, has good generalization ability and robustness, can adapt to various image scenes and lighting conditions, and predict the optimal compensation value.

[0056] S4: adjusting the brightness, contrast and color saturation of the corresponding semantic area based on the compensation value.

[0057] In this embodiment, the brightness, contrast and saturation of each semantic area are adjusted according to the compensation value calculated in step S3. By specifically adjusting the exposure of each semantic area, the overall visual effect of the image can be significantly improved, making the details clearer, the colors richer, and the contrast more natural, thereby enhancing the viewing and practicality of the image.

[0058] S5: Fuse all adjusted semantic regions and output the final compensated image.

[0059] In this embodiment, all semantic areas that have been adjusted for exposure are seamlessly stitched together to form a final compensated image. During the stitching process, the boundaries need to be optimized, and the edge detection method is used to ensure that the transition between different areas is smooth and natural, avoiding obvious boundary effects, thereby ensuring the overall visual effect of the image.

[0060] Specifically, step S1 specifically includes:

[0061] S101: pre-processing the acquired image to be compensated.

[0062] In this embodiment, the acquired high-resolution image is first preprocessed, including but not limited to size standardization, color correction, noise removal and sharpening. Size standardization ensures that the image can adapt to the input requirements of the model, color correction is used to calibrate the white balance and color deviation of the image, and noise removal and sharpening are intended to improve the quality of the image, reduce unnecessary interference factors, and provide a clearer and cleaner basic image for subsequent semantic segmentation.

[0063] The preprocessing step can significantly improve the quality of the image, reduce the noise and deviation in the image, and make the subsequent semantic segmentation and exposure compensation more accurate and reliable. Size standardization ensures the consistency of the model input, color correction and noise removal improve the visual effect of the image, and sharpening enhances the details of the image, which improves the accuracy and efficiency of image processing as a whole.

[0064] S102: extracting semantic features from the preprocessed image to be compensated by inputting a pre-trained semantic segmentation model, and performing classification according to the extracted semantic features to obtain a semantic category of each pixel.

[0065] In this embodiment, the preprocessed image is input into a pre-trained semantic segmentation model, which is based on a convolutional neural network architecture and can automatically learn and extract semantic features in the image, including edges, textures, and shapes. These features are used to distinguish different objects or scenes in the image. The output of the model is the semantic category of each pixel, that is, the image is segmented into multiple semantic regions, each of which corresponds to a specific object or scene type.

[0066] The pre-trained semantic segmentation model can automatically identify different objects or scenes in the image, provide accurate semantic area division, and provide important area information for subsequent exposure compensation. Compared with traditional rule-based image segmentation methods, deep learning models can handle more complex scenes and provide more sophisticated and accurate segmentation results, significantly improving the intelligence level and effect of image processing.

[0067] S103: Segment the image to be compensated into a plurality of semantic regions according to the semantic category of each pixel, and each semantic region is defined with a semantic category.

[0068] In this embodiment, the entire image is segmented into multiple semantic regions according to the obtained semantic category of each pixel, each of which contains a group of pixels with the same semantic category, and these regions may correspond to different objects or scenes such as the sky, buildings, people, vehicles, etc. In this way, personalized exposure compensation can be performed for different semantic regions to optimize the visual effect of the entire image.

[0069] Image segmentation based on semantic categories can ensure that the exposure compensation of each semantic area is performed according to its characteristics, avoiding the overexposure or underexposure problems that may be caused by global adjustments. This method can significantly improve the details and layering of the image, especially in scenes with complex lighting conditions or blurred object boundaries, and can effectively improve the visual effect of the image and enhance the intelligence and automation level of image processing.

[0070] Specifically, step S2 specifically includes:

[0071] S201: averaging the brightness values ​​of all pixels in each semantic area, and using the average brightness as the brightness of the semantic area.

[0072] In this embodiment, all pixels in each semantic area are traversed and the average brightness values ​​of these pixels are calculated. The average brightness value reflects the overall brightness level of the semantic area. By calculating the average brightness, we can quantify the exposure of each semantic area and provide important benchmark data for subsequent exposure compensation.

[0073] In addition, in order to calculate the average brightness, it is necessary to convert it into a grayscale image and calculate the average value of the brightness channel in the grayscale image.

[0074] S202: Calculate the standard deviation of the brightness of all pixels in each semantic area and use it as the contrast of the semantic area.

[0075] In this embodiment, all pixels in each semantic area are traversed to calculate the standard deviation of the brightness values ​​of these pixels. The standard deviation is a statistical measure used to describe the degree of dispersion of data distribution, that is, the degree of fluctuation of data points relative to the average value. In image processing, the standard deviation of brightness can be regarded as a measure of the contrast of the area. A high contrast area means a large distribution range of brightness values, and vice versa.

[0076] Calculating the brightness standard deviation as contrast can further quantify the brightness changes within each semantic area, which is very important for subsequent exposure compensation.

[0077] S203: Convert all pixel values ​​in each semantic area into the HSV color space, and calculate the average value of the saturation component as the color saturation of the semantic area.

[0078] In this embodiment, the pixel values ​​in each semantic region are converted from the RGB color space to the HSV color space. The HSV color space decomposes the color into three independent components: hue, saturation, and value, where the saturation component represents the purity or vividness of the color. The average value of the saturation component of each semantic region is calculated as the color saturation of the region.

[0079] Color saturation is an important indicator of the color vividness of an image. By calculating the average saturation, we can understand the color richness of each semantic area.

[0080] S204: Create a feature list for each semantic region, and store the extracted brightness, contrast, and color saturation in the feature list.

[0081] In this embodiment, a feature list is created for each semantic region, and the brightness, contrast, and color saturation extracted in steps S201 to S203 are stored in the list. This feature list will be used as input for calculating compensation values ​​in subsequent steps, ensuring that the model can obtain complete feature information of each semantic region, facilitating the model to quickly access and process the features of each semantic region, and ensuring the efficiency and accuracy of the calculation process.

[0082] Specifically, in step S3, the training process of the compensation value calculation model includes:

[0083] An image training set is collected and annotated, wherein the training images in the image training set are annotated with sample semantic regions and corresponding sample compensation values.

[0084] In this example, a large image training set is constructed, which contains images of various scenes, lighting conditions, and shooting angles to ensure the generalization ability of the model. For each training image, we annotate it in detail, including but not limited to:

[0085] Label each semantic region in the image, such as sky, buildings, people, vehicles, etc.

[0086] For each semantic area, professional image processing personnel or automated tools will annotate its ideal exposure compensation value, which includes the adjustment amount of brightness, contrast and saturation to achieve the best visual effect.

[0087] By building a diverse training set and annotating it in detail, we can ensure that the model is exposed to a variety of scenarios during training, thereby improving the generalization and robustness of the model. The annotated compensation values ​​serve as supervisory signals to guide the model to learn how to predict reasonable exposure compensation values ​​based on the input features, which is the key to successful model training.

[0088] The brightness, contrast and color saturation of the sample semantic area are extracted from each training image in the image training set, and input into the compensation value calculation model based on the convolutional neural network for back propagation to minimize the error between the predicted compensation value and the sample compensation value, and finally obtain a trained compensation value calculation model.

[0089] In this embodiment, the features of each semantic region, including brightness, contrast, and color saturation, are extracted from the training image, and then input into a pre-built convolutional neural network model, which calculates the predicted compensation value through forward propagation. Next, the error between the annotated true compensation value and the predicted value is used to adjust the weight of the model. Through multiple iterations, the model gradually learns how to predict the compensation value closest to the true value based on the input features.

[0090] Through training based on a large amount of labeled data, the convolutional neural network model can learn the complex relationship between input features and output compensation values, and has the ability to predict the best exposure compensation from image features. After the model training is completed, this ability can be used for new images that have never been seen before to achieve automatic and refined exposure compensation, significantly improving the efficiency and effect of image processing.

[0091] Specifically, step S3 is as follows:

[0092] Brightness, contrast and color saturation are extracted from the feature list corresponding to the semantic area and input into the trained compensation value calculation model to perform forward propagation, and the compensation value corresponding to each semantic area is output, wherein the compensation value includes brightness compensation value, contrast compensation value and color saturation compensation value.

[0093] In this embodiment, the three key image features of brightness, contrast and color saturation are extracted from the feature list created for each semantic region in step S2, and these features are then input into the previously trained compensation value calculation model, which is a deep learning model, usually based on a convolutional neural network (CNN), which has learned how to predict the best compensation value based on the input features through a large amount of training data. During the forward propagation of the model, it calculates the brightness compensation value, contrast compensation value and color saturation compensation value required for each semantic region. These compensation values ​​are tailored to the specific features of each semantic region based on the knowledge learned by the model during the training phase, aiming to optimize the exposure effect of the image.

[0094] Specifically, step S4 specifically includes:

[0095] S401: Perform brightness compensation on the corresponding semantic area based on the brightness compensation value, and update the brightness of each pixel in the semantic area according to the compensated brightness.

[0096] In this embodiment, the brightness of each semantic area is adjusted based on the calculated brightness compensation value, and the adjustment process is usually achieved by increasing or decreasing the brightness value of each pixel, and the specific adjustment amount is determined by the compensation value. For example, if the brightness compensation value of a semantic area is +10%, the brightness value of each pixel in the area will be increased accordingly to achieve a better exposure effect.

[0097] S402: Perform contrast compensation on the corresponding semantic area based on the contrast compensation value, and update the contrast of each pixel in the semantic area according to the compensated contrast.

[0098] In this embodiment, the contrast of each semantic area is adjusted using the obtained contrast compensation value. Adjusting the contrast usually involves changing the brightness difference between pixels to enhance or weaken the layering of the image. Exemplarily, if the contrast compensation value of a certain area indicates that the contrast needs to be enhanced, the difference between high-brightness pixels and low-brightness pixels in the area will be increased, and vice versa.

[0099] S403: Perform color saturation compensation on the corresponding semantic area based on the color saturation, and update the color saturation of each pixel in the semantic area according to the compensated color saturation.

[0100] In this embodiment, the color saturation of each semantic region is adjusted according to the calculated color saturation compensation value. Adjusting the saturation usually involves changing the vividness of the pixel color to enhance or weaken the color performance of the image. For example, if the color saturation compensation value of a region indicates that the saturation needs to be increased, then we increase the vividness of the color in the region, and vice versa.

[0101] Specifically, step S5 specifically includes:

[0102] S501: Use an edge detection algorithm to find the boundaries of adjacent semantic regions.

[0103] In this embodiment, edge detection algorithms, including but not limited to Canny edge detection, Sobel operator, and Laplacian operator, are used to identify the boundaries of adjacent semantic regions in the image. The edge detection algorithm can highlight the sharp changes in brightness or color in the image, thereby locating the boundaries between different semantic regions. In this way, it is possible to accurately find out which pixels are located at the junction of different semantic regions, preparing for subsequent boundary processing.

[0104] S502: For pixels located on the boundary, weighted average is used to calculate attribute values ​​including brightness, contrast and color saturation, wherein the calculation formula is:

[0105]

[0106] in, and are the adjusted attribute values ​​of pixel p in semantic region R1 and semantic region R2, ω1 and ω2 are the weights calculated based on the distance between pixel p and the boundary, and C p ′ The attribute value is calculated as a weighted average.

[0107] In this embodiment, by using weighted average to calculate the attribute values ​​of boundary pixels, a smooth transition between different semantic areas can be achieved. This method can ensure that the image attributes at the boundary (specifically brightness, contrast, and color saturation) naturally change gradually between two adjacent areas, avoiding boundary effects and making the final image look more visually coherent and natural.

[0108] S503: Use the calculated attribute value to update the original attribute value of each pixel located on the boundary.

[0109] In this embodiment, the calculated attribute value (weighted average of brightness, contrast and color saturation) is used to update the original attribute value of each pixel located on the boundary. In this way, the attribute value of the boundary pixel is adjusted to reflect its transition state between two adjacent semantic areas.

[0110] By updating the attribute values ​​of boundary pixels, it is possible to ensure that these pixels present a natural transition effect in the final image, avoiding visual artifacts that may be caused by sudden changes in attribute values ​​of different semantic regions. This method can improve the overall visual quality and coherence of the image, making the image look more harmonious between different regions, and enhancing the image's aesthetic and professional feel.

[0111] The working principle of the regional exposure compensation method based on machine learning provided by the present invention is as follows: the image is segmented by using semantic features to obtain multiple regions with clear semantics. This regional processing method can fully consider the differences in image content and provide accurate target areas for subsequent compensation strategies; then, by extracting image features such as brightness, contrast and color saturation of each semantic region, and inputting a pre-trained compensation value calculation model for forward propagation calculation, a personalized compensation value for each region is obtained, which can automatically learn and adapt to different lighting conditions and exposure compensation requirements of the shooting object; finally, based on the calculated compensation value, the brightness, contrast and color saturation of the corresponding semantic region are finely adjusted to make the overall image more natural and harmonious. The present invention realizes efficient and accurate compensation for image exposure and significantly improves the visual effect of the image.

[0112] Embodiment 2

[0113] The present invention also provides a regional exposure compensation system based on machine learning, which is applied to a regional exposure compensation method based on machine learning, referring to Figure 2 As shown, the compensation system includes:

[0114] The segmentation module 100 is used to obtain an image to be compensated, and segment the image to be compensated based on semantic features to obtain at least one semantic region.

[0115] The feature extraction module 200 is used to extract regional image features of the at least one semantic region, wherein the regional image features include brightness, contrast and color saturation.

[0116] The compensation value calculation module 300 is used to input the regional image features extracted from each semantic region into the pre-trained compensation value calculation model one by one for forward propagation calculation to obtain the compensation value corresponding to each semantic region.

[0117] The adjustment module 400 is used to adjust the brightness, contrast and color saturation of the corresponding semantic area based on the compensation value.

[0118] The fusion module 500 is used to fuse all adjusted semantic regions and output a final compensated image.

[0119] The present application is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0120] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0121] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device that includes a series of elements includes not only those elements, but also other elements that are not explicitly listed, or includes elements that are inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device that includes the elements.

Claims

1. A regional exposure compensation method based on machine learning, It is characterized in that The compensation method includes the following steps: S1: Acquire an image to be compensated, and segment the image to be compensated based on semantic features to obtain at least one semantic region; S2: extracting regional image features of the at least one semantic region, wherein the regional image features include brightness, contrast, and color saturation; S3: Input the regional image features extracted from each semantic region into the pre-trained compensation value calculation model one by one for forward propagation calculation to obtain the compensation value corresponding to each semantic region; S4: adjusting the brightness, contrast and color saturation of the corresponding semantic area based on the compensation value; S5: Fuse all adjusted semantic regions and output the final compensated image.

2. The method for regional exposure compensation based on machine learning according to claim 1, It is characterized in that Step S1 specifically includes: S101: preprocessing the acquired image to be compensated; S102: extracting semantic features from the preprocessed image to be compensated by inputting a pre-trained semantic segmentation model, and classifying the image according to the extracted semantic features to obtain a semantic category of each pixel; S103: Segment the image to be compensated into a plurality of semantic regions according to the semantic category of each pixel, and each semantic region is defined with a semantic category.

3. The method for regional exposure compensation based on machine learning according to claim 2, It is characterized in that Step S2 specifically includes: S201: averaging the brightness values ​​of all pixels in each semantic area, and using the average brightness as the brightness of the semantic area; S202: Calculate the standard deviation of the brightness of all pixels in each semantic area and use it as the contrast of the semantic area; S203: converting all pixel values ​​in each semantic area into the HSV color space, and calculating the average value of the saturation component as the color saturation of the semantic area; S204: Create a feature list for each semantic region, and store the extracted brightness, contrast, and color saturation in the feature list.

4. The method for regional exposure compensation based on machine learning according to claim 3, It is characterized in that In step S3, the training process of the compensation value calculation model includes: Collecting and annotating an image training set, wherein the training images in the image training set are annotated with sample semantic regions and corresponding sample compensation values; The brightness, contrast and color saturation of the sample semantic area are extracted from each training image in the image training set, and input into the compensation value calculation model based on the convolutional neural network for back propagation to minimize the error between the predicted compensation value and the sample compensation value, and finally obtain a trained compensation value calculation model.

5. The method for regional exposure compensation based on machine learning according to claim 4, It is characterized in that Step S3 is specifically as follows: Brightness, contrast and color saturation are extracted from the feature list corresponding to the semantic area and input into the trained compensation value calculation model to perform forward propagation, and the compensation value corresponding to each semantic area is output, wherein the compensation value includes brightness compensation value, contrast compensation value and color saturation compensation value.

6. The method for regional exposure compensation based on machine learning according to claim 5, It is characterized in that Step S4 specifically includes: S401: performing brightness compensation on a corresponding semantic area based on the brightness compensation value, and updating the brightness of each pixel in the semantic area according to the compensated brightness; S402: performing contrast compensation on the corresponding semantic area based on the contrast compensation value, and updating the contrast of each pixel in the semantic area according to the compensated contrast; S403: Perform color saturation compensation on the corresponding semantic area based on the color saturation, and update the color saturation of each pixel in the semantic area according to the compensated color saturation.

7. The method for regional exposure compensation based on machine learning according to claim 6, It is characterized in that Step S5 specifically includes: S501: using an edge detection algorithm to find the boundaries of adjacent semantic areas; S502: For pixels located on the boundary, weighted average is used to calculate attribute values ​​including brightness, contrast and color saturation, wherein the calculation formula is: in, and are pixel p in the semantic region R 1 and semantic region R 2 The adjusted attribute value in ,ω 1 and ω 2 is the weight calculated based on the distance of pixel p from the boundary, C ′ p The attribute value is calculated by weighted average; S503: Use the calculated attribute value to update the original attribute value of each pixel located on the boundary.

8. A regional exposure compensation system based on machine learning, applied to a regional exposure compensation method based on machine learning as claimed in any one of claims 1 to 7, It is characterized in that The compensation system includes: A segmentation module, used for acquiring an image to be compensated, and segmenting the image to be compensated based on semantic features to obtain at least one semantic region; A feature extraction module, used to extract regional image features of the at least one semantic region, wherein the regional image features include brightness, contrast and color saturation; A compensation value calculation module is used to input the regional image features extracted from each semantic region into a pre-trained compensation value calculation model one by one for forward propagation calculation to obtain a compensation value corresponding to each semantic region; An adjustment module, configured to adjust the brightness, contrast and color saturation of the corresponding semantic area based on the compensation value; The fusion module is used to fuse all adjusted semantic regions and output the final compensated image.

Citation Information

Patent Citations

  • Method for compositing multiple images with different exposure levels

    CN106169182A

  • Image processing method and electronic equipment

    CN117745620A

  • Adaptive image compensating device and method thereof

    KR1020120066250A

  • Integrated machine learning algorithms for image filters

    US20230146181A1

Cited By

  • Control signal driving and fault early warning integrated method based on liquid crystal display screen

    CN121331065A

  • Method, equipment and medium for predicting moisture content of dewatered sludge cake

    CN122636986A

  • Model training method, display compensation method and model training apparatus

    WO2026156576A1