An image chroma adjustment method and system based on an AI algorithm and an electronic photo frame
By using an AI-based frequency domain decomposition and specific adjustment model, the problem of chromaticity imbalance in image chromaticity processing was solved, achieving precise adjustment of image hue, texture, and edge chromaticity, thus improving the visual quality of the image.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN KEJINMING ELECTRONICS CO LTD
- Filing Date
- 2025-07-15
- Publication Date
- 2026-05-15
AI Technical Summary
Existing technologies fail to consider the characteristic differences of different regions when processing image chroma, resulting in image chroma imbalance and reduced visual quality.
An AI-based image chroma adjustment method is adopted, which extracts features of low-frequency hue, mid-frequency texture and high-frequency edge components through frequency domain decomposition, generates targeted adjustment parameters using a preset frequency band specific adjustment model, and combines edge chroma continuity analysis to achieve accurate chroma adjustment for different frequency bands.
It improves the color balance and visual quality of the image, ensuring the harmony and consistency of image hue, texture, and edge color.
Smart Images

Figure CN120953148B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to an image color adjustment method, system, and electronic photo frame based on AI algorithms. Background Technology
[0002] A digital photo frame is a device that can dynamically play images, videos, and other multimedia content to display information such as photos, calendars, and schedules. Current digital photo frames generally display images directly taken by the user. However, due to differences in photography skills, user-taken images often have visual quality defects. Therefore, before uploading images to a digital photo frame, they are usually processed using professional software on a mobile phone or computer, and then displayed on the digital photo frame. In other words, digital photo frames do not have image optimization capabilities.
[0003] In image processing, adjusting image chroma is a crucial step. Image chroma encompasses elements such as hue, saturation, and brightness, directly affecting the visual presentation and information transmission quality of an image. It has wide applications in numerous fields, including post-processing of photographs, film and television production, computer vision, virtual reality, and intelligent security.
[0004] Currently, color processing of images primarily relies on pre-defined mathematical models or empirical formulas to uniformly adjust the color parameters of all pixels in the image. For example, in post-processing software, tools such as brightness-contrast adjustment and saturation adjustment are used to adjust image parameters, making the overall image brighter, enhancing contrast, or making colors more vibrant. While this method is simple to operate, it does not consider the characteristic differences of different regions within the image. Since images carry different levels of color information across different frequency bands, failing to adjust the color map according to different color information when processing images of complex scenes can easily lead to color imbalance, thereby reducing the visual quality of the image. Summary of the Invention
[0005] This application provides an image color adjustment method, system, and electronic photo frame based on AI algorithms, which can improve the visual quality of images.
[0006] The first aspect of this application provides an image chroma adjustment method based on AI algorithms, including:
[0007] The image to be processed is decomposed in the frequency domain to generate an initial frequency domain feature matrix, which includes low-frequency tone components, mid-frequency texture components, and high-frequency edge components.
[0008] Extract the low-frequency chromaticity features of the low-frequency hue component and the mid-frequency chromaticity features of the mid-frequency texture component;
[0009] The low-frequency chromaticity features and the mid-frequency chromaticity features are input into a preset frequency band specific adjustment model, and the basic hue correction parameters of the low-frequency chromaticity components and the texture chromaticity balance parameters of the mid-frequency texture components are output.
[0010] Based on the basic tone correction parameters and the texture chromaticity balance parameters, an edge chromaticity continuity analysis is performed on the high-frequency edge components, and the edge chromaticity adjustment parameters of the high-frequency edge components are determined according to the edge chromaticity continuity analysis results.
[0011] The basic tone correction parameter, the texture chromaticity balance parameter, and the edge chromaticity adjustment parameter are applied to the corresponding frequency band components in the initial frequency domain feature matrix to obtain the target frequency domain feature matrix;
[0012] The target frequency domain feature matrix is subjected to inverse frequency domain transformation to generate the target image.
[0013] Optionally, the extraction of low-frequency chromaticity features of the low-frequency hue component and mid-frequency chromaticity features of the mid-frequency texture component includes:
[0014] The initial frequency domain feature matrix is converted to the HSV color space;
[0015] The region of the low-frequency hue component in the HSV color space is defined as the low-frequency region, and the region of the mid-frequency texture component in the HSV color space is defined as the mid-frequency region.
[0016] The low-frequency chromaticity features of the low-frequency hue component are obtained by calculating the average chromaticity, standard deviation of chromaticity, average saturation, and standard deviation of saturation of all pixels in the low-frequency region.
[0017] The gradient and orientation of all pixels within the mid-frequency region are calculated to obtain the mid-frequency chromaticity features of the mid-frequency texture component.
[0018] Optionally, before inputting the low-frequency chromaticity features and the mid-frequency chromaticity features into the preset frequency band-specific adjustment model, the method further includes:
[0019] Collect sample images of several different types;
[0020] Calculate the low-frequency chromaticity features of the sample low-frequency hue component and the mid-frequency chromaticity features of the sample mid-frequency texture component in each sample image;
[0021] The low-frequency chromaticity features and mid-frequency chromaticity features of all sample images are used as training sample sets. Preset chromaticity deviation threshold and preset color uniformity threshold are used as labels. The basic hue correction parameters of the low-frequency chromaticity components and the texture chromaticity balance parameters of the mid-frequency texture components are used as predicted values. The pre-trained model based on convolutional neural network is iteratively trained.
[0022] The pre-trained model that has completed training is determined to be a preset frequency band-specific adjustment model.
[0023] Optionally, the step of performing edge chromaticity continuity analysis on the high-frequency edge components based on the basic hue correction parameters and the texture chromaticity balance parameters, and determining the edge chromaticity adjustment parameters of the high-frequency edge components based on the edge chromaticity continuity analysis results, includes:
[0024] Obtain all edge pixels and neighboring pixels within the high-frequency edge component, where the neighboring pixels are pixels in the region adjacent to the edge pixels;
[0025] Calculate the average chromaticity difference between the edge pixel and the neighboring pixel;
[0026] A continuity score is calculated based on the average chromaticity difference value;
[0027] Based on the aforementioned continuous scoring, a basic adjustment coefficient is generated;
[0028] The basic adjustment coefficients are modulated using the basic tone correction parameters and the texture chromaticity balance parameters to obtain the edge chromaticity adjustment parameters.
[0029] Optionally, the step of performing frequency domain decomposition on the image to be processed to generate an initial frequency domain feature matrix includes:
[0030] Obtain the raw chromaticity data of the image to be processed;
[0031] The original chromaticity data is standardized to obtain the original chromaticity matrix;
[0032] The original chromaticity matrix is decomposed into a multi-scale frequency domain using the small Bode transform algorithm to generate an initial frequency domain feature matrix.
[0033] Optionally, the step of applying the basic tone correction parameter, the texture chromaticity balance parameter, and the edge chromaticity adjustment parameter to the corresponding frequency band components in the initial frequency domain feature matrix to obtain the target frequency domain feature matrix includes:
[0034] The low-frequency tone component is corrected using the aforementioned basic tone correction parameters to obtain the target low-frequency component.
[0035] The mid-frequency texture component is balanced and corrected using the texture chromaticity balance parameter to obtain the target mid-frequency component.
[0036] The high-frequency edge component is corrected using the edge chromaticity adjustment parameters to obtain the target high-frequency component.
[0037] A target frequency domain feature matrix is generated based on the target low-frequency component, the target mid-frequency component, and the target high-frequency component.
[0038] A second aspect of this application provides an image color adjustment system based on an AI algorithm, comprising:
[0039] The frequency domain decomposition unit is used to perform frequency domain decomposition on the image to be processed and generate an initial frequency domain feature matrix, which includes low-frequency tone components, mid-frequency texture components and high-frequency edge components.
[0040] An extraction unit is used to extract the low-frequency chromaticity features of the low-frequency hue component and the mid-frequency chromaticity features of the mid-frequency texture component;
[0041] The input unit is used to input the low-frequency chromaticity features and the mid-frequency chromaticity features into a preset frequency band specific adjustment model, and output the basic hue correction parameters of the low-frequency chromaticity components and the texture chromaticity balance parameters of the mid-frequency texture components.
[0042] The analysis unit is used to perform edge chromaticity continuity analysis on the high-frequency edge components based on the basic hue correction parameters and the texture chromaticity balance parameters, and to determine the edge chromaticity adjustment parameters of the high-frequency edge components based on the edge chromaticity continuity analysis results.
[0043] The action unit is used to apply the basic tone correction parameter, the texture chromaticity balance parameter and the edge chromaticity adjustment parameter to the corresponding frequency band components in the initial frequency domain feature matrix to obtain the target frequency domain feature matrix;
[0044] The processing unit is used to perform inverse frequency domain transformation on the target frequency domain feature matrix to generate a target image.
[0045] Optionally, the extraction unit is specifically used for:
[0046] The initial frequency domain feature matrix is converted to the HSV color space;
[0047] The region of the low-frequency hue component in the HSV color space is defined as the low-frequency region, and the region of the mid-frequency texture component in the HSV color space is defined as the mid-frequency region.
[0048] The average chromaticity, standard deviation of chromaticity, average saturation, and standard deviation of saturation of all pixels in the low-frequency region and all pixels in the mid-frequency region are calculated respectively to obtain the low-frequency chromaticity features of the low-frequency hue component and the mid-frequency chromaticity features of the mid-frequency texture component.
[0049] Optionally, the AI-based image chroma adjustment system further includes:
[0050] The collection unit is used to collect several different types of sample images;
[0051] The calculation unit is used to calculate the sample low-frequency chromaticity features corresponding to the sample low-frequency hue component and the sample mid-frequency chromaticity features corresponding to the sample mid-frequency texture component in each sample image.
[0052] The training unit is used to take the low-frequency chromaticity features and mid-frequency chromaticity features of all sample images as the training sample set, the preset chromaticity deviation threshold and preset color uniformity threshold as labels, and the basic tone correction parameters of the low-frequency chromaticity components and the texture chromaticity balance parameters of the mid-frequency texture components as prediction values to iteratively train the pre-trained model based on the convolutional neural network.
[0053] A determining unit is used to determine that the pre-trained model after training is a preset frequency band specific adjustment model.
[0054] A third aspect of this application provides an electronic photo frame, comprising:
[0055] Processor, memory, input / output units, and bus;
[0056] The processor is connected to the memory, the input / output unit, and the bus;
[0057] The memory stores a program, which the processor invokes to execute the first aspect and any optional method within the first aspect.
[0058] As can be seen from the above technical solutions, this application has the following effects:
[0059] First, the image to be processed is decomposed in the frequency domain to generate an initial frequency domain feature matrix, which includes low-frequency hue components, mid-frequency texture components, and high-frequency edge components. Then, low-frequency chromaticity features of the low-frequency hue components and mid-frequency chromaticity features of the mid-frequency texture components are extracted. Next, the low-frequency and mid-frequency chromaticity features are input into a preset frequency band-specific adjustment model, which outputs the basic hue correction parameters for the low-frequency chromaticity components and the texture chromaticity balance parameters for the mid-frequency texture components. Further, based on the basic hue correction parameters and texture chromaticity balance parameters, edge chromaticity continuity analysis is performed on the high-frequency edge components, and the edge chromaticity adjustment parameters for the high-frequency edge components are determined according to the results of the edge chromaticity continuity analysis. Then, the basic hue correction parameters, texture chromaticity balance parameters, and edge chromaticity adjustment parameters are applied to the corresponding frequency band components in the initial frequency domain feature matrix to obtain the target frequency domain feature matrix. Finally, the target frequency domain feature matrix is subjected to inverse frequency domain transformation to generate the target image. In this way, by performing frequency domain decomposition on the image to be processed, extracting the chromaticity features of different frequency bands, and then using AI models to generate targeted adjustment parameters, combined with edge chromaticity continuity analysis, it is possible to achieve precise adjustment of image hue, texture and edge chromaticity in different frequency bands, thereby improving the chromaticity balance after chromaticity adjustment and thus improving the visual quality of the image. Attached Figure Description
[0060] Figure 1 This is a schematic diagram of an embodiment of an image chroma adjustment method based on an AI algorithm in this application;
[0061] Figure 2-1 , Figure 2-2 and Figure 2-3 This is a schematic diagram of another embodiment of an image chroma adjustment method based on an AI algorithm in this application;
[0062] Figure 3 This is a schematic diagram of an embodiment of an image chroma adjustment system based on an AI algorithm according to this application;
[0063] Figure 4 This is a schematic diagram of one embodiment of an electronic photo frame according to this application. Detailed Implementation
[0064] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0065] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0066] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0067] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0068] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0069] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0070] In existing technologies, color processing of images primarily relies on preset mathematical models or empirical formulas to uniformly adjust the color parameters of all pixels in the image. For example, in post-processing software, tools such as brightness-contrast adjustment and saturation adjustment are used to adjust image parameters, making the overall image brighter, enhancing contrast, or making colors more vibrant. While this method is simple to operate, it does not consider the characteristic differences of different regions within the image. Since images carry different levels of color information across different frequency bands, failing to adjust the color map according to different color information when processing images of complex scenes can easily lead to color imbalance, thereby reducing the visual quality of the image.
[0071] Based on this, this application discloses an image color adjustment method, system, and electronic photo frame based on AI algorithms, which can improve the visual quality of images.
[0072] The technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0073] The AI-based image color adjustment method described in this application is implemented on an electronic photo frame. Please refer to [link / reference]. Figure 1 As shown, one embodiment of the image chroma adjustment method based on AI algorithms in this application includes:
[0074] 101. Perform frequency domain decomposition on the image to be processed to generate an initial frequency domain feature matrix, which includes low-frequency tone components, mid-frequency texture components, and high-frequency edge components.
[0075] In digital image processing, frequency domain decomposition is an important method for converting images from the spatial domain to the frequency domain. In this embodiment, a multi-scale analysis algorithm is used to perform frequency domain decomposition on the image to be processed, generating components containing multiple different frequency bands. The information of these components is stored in the form of a matrix to obtain an initial frequency domain feature matrix. The multi-scale analysis algorithm can be wavelet transform, curvelet transform, or contourlet transform, etc., and is not limited here. The initial frequency domain feature matrix includes low-frequency hue components, mid-frequency texture components, and high-frequency edge components. Specifically, the low-frequency hue components mainly retain the overall hue information of the image, the mid-frequency texture components contain the texture details of the image, and the high-frequency edge components record the edge and contour information of the image. For example, for a landscape image, the low-frequency hue components may contain the hue information of large areas such as the sky and the ground; the mid-frequency texture components may contain the chromaticity information of texture details such as trees and grass; and the high-frequency edge components may contain the chromaticity information of edges such as mountains and buildings.
[0076] 102. Extract the low-frequency chromaticity features of the low-frequency hue component and the mid-frequency chromaticity features of the mid-frequency texture component;
[0077] In this embodiment, low-frequency chromaticity features are features extracted from low-frequency hue components, including hue, saturation, and brightness. These features describe the overall color characteristics of the image. For example, for a snow scene photo, low-frequency chromaticity features might show a bluish hue, low saturation, and high brightness. Mid-frequency chromaticity features are features extracted from mid-frequency texture components, including texture direction and texture intensity. Texture direction describes the direction of the texture, such as horizontal, vertical, or slanted; texture intensity indicates the prominence of the texture. For example, for an image containing wood grain, mid-frequency chromaticity features are used to represent the direction and depth of the wood grain.
[0078] 103. Input the low-frequency chromaticity features and mid-frequency chromaticity features into the preset frequency band specific adjustment model, and output the basic hue correction parameters of the low-frequency chromaticity components and the texture chromaticity balance parameters of the mid-frequency texture components;
[0079] In this embodiment, the preset frequency band-specific adjustment model is a deep neural network model, consisting of a low-frequency feature processing subnetwork, a mid-frequency feature processing subnetwork, and a parameter generation subnetwork. Low-frequency chroma features are input to the low-frequency feature processing subnetwork, which extracts higher-level feature representations through multiple convolutional and pooling operations. Mid-frequency chroma features are input to the mid-frequency feature processing subnetwork, where feature extraction and transformation are also performed. The outputs of the two subnetworks are then merged and input to the parameter generation subnetwork. The parameter generation subnetwork generates basic tone correction parameters and texture chroma balance parameters through fully connected layers and activation functions. The basic tone correction parameters include tone shift, saturation adjustment coefficient, and brightness adjustment coefficient; the texture chroma balance parameters include texture direction enhancement coefficient and texture intensity adjustment coefficient. For example, if the low-frequency chromaticity features indicate that the overall tone of the image to be processed is reddish and the saturation is high, then the basic tone correction parameters are to appropriately reduce the red component and fine-tune the saturation to make the color of the image to be processed more natural; if the mid-frequency chromaticity features indicate that the direction of the tree texture is mainly concentrated in the horizontal and vertical directions and the intensity is moderate, then the texture chromaticity balance parameters are to enhance the texture in the horizontal and vertical directions, while adjusting the color of the texture part to make it more coordinated with the overall tone.
[0080] 104. Based on the basic tone correction parameters and texture chromaticity balance parameters, perform edge chromaticity continuity analysis on the high-frequency edge components, and determine the edge chromaticity adjustment parameters of the high-frequency edge components according to the edge chromaticity continuity analysis results;
[0081] In this embodiment, the continuity and naturalness of color at the edge are determined by comparing the edge pixels of the high-frequency edge component with the pixel chromaticity information of adjacent low-frequency hue components and mid-frequency texture components. Specifically, the color difference between the edge pixels of the high-frequency edge component and adjacent low-frequency and mid-frequency pixels in different color spaces is calculated. If the color difference exceeds a certain threshold, a color discontinuity is considered to exist. For example, in a portrait photograph, there is a color discontinuity between the edge of the person and the background. Based on the basic hue correction parameters and texture chromaticity balance parameters, the required chromaticity values of the edge pixels are recalculated. Through multiple iterative calculations, edge chromaticity adjustment parameters that can make the edge color continuous are determined, such as adjusting the hue, saturation, and brightness of the edge pixels.
[0082] 105. Apply the basic tone correction parameters, texture chromaticity balance parameters, and edge chromaticity adjustment parameters to the corresponding frequency band components in the initial frequency domain feature matrix to obtain the target frequency domain feature matrix;
[0083] In this embodiment, based on the obtained adjustment parameters, the low-frequency hue component, mid-frequency texture component, and high-frequency edge component in the initial frequency domain feature matrix are adjusted accordingly. Specifically, the basic hue correction parameter is used to correct the low-frequency hue component; the texture chromaticity balance parameter is used to correct the mid-frequency texture component; and the edge chromaticity adjustment parameter is used to correct the high-frequency edge component. For example, for a landscape photograph that has undergone the above processing, the basic hue correction parameter is applied to the low-frequency hue component to make the blue of the sky purer; the texture chromaticity balance parameter is applied to the mid-frequency texture component to make the green of the leaves more natural; and the edge chromaticity adjustment parameter is applied to the high-frequency edge component to make the transition between the edge of the mountains and the background smoother, ultimately obtaining the target frequency domain feature matrix.
[0084] 106. Perform inverse frequency domain transformation on the target frequency domain feature matrix to generate the target image.
[0085] By employing an inverse transformation method corresponding to frequency domain decomposition, such as discrete wavelet inverse transform, the target frequency domain feature matrix is transformed back to the spatial domain to obtain the final target image.
[0086] In this embodiment, the image to be processed is first decomposed in the frequency domain to generate an initial frequency domain feature matrix, which includes low-frequency hue components, mid-frequency texture components, and high-frequency edge components. Then, the low-frequency chromaticity features of the low-frequency hue components and the mid-frequency chromaticity features of the mid-frequency texture components are extracted. The low-frequency and mid-frequency chromaticity features are then input into a preset frequency band-specific adjustment model to output the basic hue correction parameters of the low-frequency chromaticity components and the texture chromaticity balance parameters of the mid-frequency texture components. Further, based on the basic hue correction parameters and the texture chromaticity balance parameters, edge chromaticity continuity analysis is performed on the high-frequency edge components, and the edge chromaticity adjustment parameters of the high-frequency edge components are determined according to the edge chromaticity continuity analysis results. Further, the basic hue correction parameters, texture chromaticity balance parameters, and edge chromaticity adjustment parameters are applied to the corresponding frequency band components in the initial frequency domain feature matrix to obtain the target frequency domain feature matrix. Finally, the target frequency domain feature matrix is subjected to inverse frequency domain transformation to generate the target image. In this way, by performing frequency domain decomposition on the image to be processed, extracting the chromaticity features of different frequency bands, and then using AI models to generate targeted adjustment parameters, combined with edge chromaticity continuity analysis, it is possible to achieve precise adjustment of image hue, texture and edge chromaticity in different frequency bands, thereby improving the chromaticity balance after chromaticity adjustment and thus improving the visual quality of the image.
[0087] Please see Figure 2-1 , Figure 2-2 and Figure 2-3 As shown, another embodiment of the image chroma adjustment method based on AI algorithms in this application includes:
[0088] 201. Obtain the original chromaticity data of the image to be processed;
[0089] 202. Standardize the original chromaticity data to obtain the original chromaticity matrix;
[0090] 203. The original chroma matrix is decomposed into a multi-scale frequency domain using the small Bode transform algorithm to generate an initial frequency domain feature matrix, which includes low-frequency hue components, mid-frequency texture components, and high-frequency edge components.
[0091] Optionally, in this embodiment, an image acquisition device, such as a camera or scanner, is used to acquire the image to be processed, and its original chromaticity data is extracted from the image. This original chromaticity data contains the basic parameters of the image's color information. Since the original chromaticity data acquired by different acquisition devices may have scale differences, it is necessary to standardize the original chromaticity data to facilitate subsequent processing and analysis. Using a specific standardization formula, the original chromaticity data is mapped to a unified scale range. The processed data is then arranged according to certain rules to form an original chromaticity matrix, so that each element corresponds to the standardized chromaticity information of a pixel in the image. The Small Bode Transform algorithm has good time-frequency localization characteristics and can analyze signals at different scales. Using the original chromaticity matrix as input, the Small Bode Transform algorithm is used to process it, decomposing the image's chromaticity information at multiple scales to obtain low-frequency hue components, mid-frequency texture components, and high-frequency edge components. Finally, the components of different frequency bands are stored in matrix form to obtain the initial frequency domain feature matrix.
[0092] 204. Convert the initial frequency domain feature matrix to the HSV color space;
[0093] 205. Determine the region of the low-frequency hue component in the HSV color space as the low-frequency region, and the region of the mid-frequency texture component in the HSV color space as the mid-frequency region;
[0094] 206. Calculate the average chromaticity, standard deviation of chromaticity, average saturation, and standard deviation of saturation of all pixels in the low-frequency region to obtain the low-frequency chromaticity characteristics of the low-frequency hue component;
[0095] 207. Calculate the gradient and orientation of all pixels in the mid-frequency region to obtain the mid-frequency chromaticity features of the mid-frequency texture component;
[0096] Optionally, in this embodiment, since the HSV (Hue-Saturation-Value) color space is more in line with the way human vision perceives color than the common RGB (Red-Green-Blue) color space, it can more intuitively analyze and process information such as chroma and saturation of an image. Therefore, the initial frequency domain feature matrix under other color spaces such as RGB can be converted to the HSV color space. Then, the regions of low-frequency hue components in the HSV color space are determined as low-frequency regions, and the regions of mid-frequency texture components in the HSV color space are determined as mid-frequency regions. In the HSV color space, different regions correspond to different feature information of the image. Low-frequency regions usually contain the main hue information of the image, reflecting the overall color tendency of the image; mid-frequency regions are related to the texture details of the image and can reflect the texture features of the surface of objects in the image. By accurately dividing the low-frequency and mid-frequency regions, the features of low-frequency hue components and mid-frequency texture components can be extracted in a targeted manner. In the process of extracting low-frequency chroma features, all pixels in the low-frequency region are traversed to obtain the chroma value and saturation value of each pixel. For each pixel, its chroma value is the value of the H channel, and its saturation value is the value of the S channel. The chroma average is obtained by summing the chroma values of all pixels and dividing by the total number of pixels. The standard deviation of the chroma is obtained by summing the squares of the differences between the chroma values of each pixel and the average chroma, dividing by the total number of pixels, and taking the square root. Similarly, the average and standard deviation of the saturation are calculated. It should be noted that the average chroma reflects the average level of pixel chroma in the low-frequency region, representing the main hue of the image; the standard deviation of the chroma represents the dispersion of pixel chroma in the low-frequency region, reflecting the stability of the hue. Similarly, the average and standard deviation of the saturation reflect the average level and dispersion of pixel saturation in the low-frequency region, respectively, and together they describe the chroma characteristics of the low-frequency hue components.
[0097] In the extraction of mid-frequency chromaticity features, for each pixel within the mid-frequency region, gradient operators such as the Sobel operator and the Prewitt operator are used to calculate its gradient magnitude and direction. Taking the Sobel operator as an example, in Python, the cv2.Sobel() function can be used to calculate the gradient value of the pixel, and then the gradient direction of the pixel is obtained by calculating the arctangent value of the gradient value. The gradient and direction information of all pixels are recorded as the mid-frequency chromaticity features of the mid-frequency texture component.
[0098] 208. Collect several sample images of different types;
[0099] 209. Calculate the low-frequency chromaticity features of the sample low-frequency hue component and the mid-frequency chromaticity features of the sample mid-frequency texture component in each sample image;
[0100] 210. Use the low-frequency chromaticity features and mid-frequency chromaticity features of all sample images as training sample sets, use preset chromaticity deviation thresholds and preset color uniformity thresholds as labels, and use the basic hue correction parameters of the low-frequency chromaticity components and the texture chromaticity balance parameters of the mid-frequency texture components as predicted values to iteratively train the pre-trained model based on the convolutional neural network.
[0101] 211. Determine that the pre-trained model that has completed training is a preset frequency band specific adjustment model.
[0102] Optionally, in this embodiment, before inputting the extracted low-frequency and mid-frequency chromaticity features into the preset frequency band-specific adjustment model, the preset frequency band-specific adjustment model needs to be trained. Specifically, firstly, a wide range of sample images of different types are collected. These image types can cover various scenes such as natural landscapes, portraits, architectural photography, and still life photography to ensure the diversity of sample images and cover various image situations that may be encountered in practical applications. Different types of images have different feature distributions in low-frequency hue and mid-frequency texture. A rich sample set helps the model learn a more comprehensive relationship between image features and chromaticity adjustment. Then, for each sample image, according to the above chromaticity feature extraction method, the sample low-frequency chromaticity features corresponding to the sample low-frequency hue component and the sample mid-frequency chromaticity features corresponding to the sample mid-frequency texture component are calculated. The sample low-frequency chromaticity features and sample mid-frequency chromaticity features of all sample images are integrated into a training sample set. At the same time, preset chromaticity deviation thresholds and preset color uniformity thresholds are set as labels. These two thresholds are used to measure the ideal effect standard after image chromaticity adjustment. The preset chromaticity deviation threshold reflects the acceptable error range between the adjusted image chromaticity and the standard chromaticity, while the preset color uniformity threshold is used to evaluate the uniformity of the image's color distribution. Finally, a pre-trained model based on a convolutional neural network is used. The training sample set is input into the model, with the preset chromaticity deviation threshold and preset color uniformity threshold as optimization objectives. The basic hue correction parameters of the low-frequency chromaticity components and the texture chromaticity balance parameters of the mid-frequency texture components are used as the predicted outputs. The model is iteratively trained using the backpropagation algorithm. During training, the model parameters are continuously adjusted so that the model's predicted adjustment parameters make the chromaticity deviation and color uniformity of the sample images as close as possible to the preset thresholds. After multiple rounds of training, when the model's performance on the validation set stabilizes and meets the preset requirements, the pre-trained model is determined to be the preset frequency band-specific adjustment model.
[0103] 212. Input the low-frequency chromaticity features and mid-frequency chromaticity features into the preset frequency band specific adjustment model, and output the basic hue correction parameters of the low-frequency chromaticity components and the texture chromaticity balance parameters of the mid-frequency texture components;
[0104] Step 212 in this embodiment is the same as described above. Figure 1 Step 103 in the illustrated embodiment is similar and will not be described again here.
[0105] 213. Obtain all edge pixels and neighboring pixels within the high-frequency edge component. Neighboring pixels are the pixels in the region adjacent to the edge pixels.
[0106] 214. Calculate the average chromaticity difference between edge pixels and neighboring pixels;
[0107] 215. Calculate the continuity score based on the average chromaticity difference value;
[0108] 216. Generate basic adjustment coefficients based on continuous scoring;
[0109] 217. Modulate the basic adjustment coefficient using the basic tone correction parameters and texture chromaticity balance parameters to obtain the edge chromaticity adjustment parameters;
[0110] Optionally, in this embodiment, edge detection algorithms such as the Canny edge detection algorithm or the Sobel operator can be used to identify edge pixels within high-frequency edge components. For each edge pixel, its neighboring pixels are determined according to a set neighborhood range, such as a 3×3 or 5×5 square area centered on the edge pixel. When calculating chromaticity differences, for each edge pixel and its neighboring pixels, their coordinate values in the HSV color space are obtained respectively, where the edge pixel... The coordinates are Its neighboring pixels The coordinates are Next, the chromaticity difference between each edge pixel and its neighboring pixels is calculated using the Euclidean distance formula. ,in, Then, sum the chromaticity differences between the edge pixel and all its neighboring pixels, and divide by the number of neighboring pixels to obtain the average chromaticity difference value. This average chromaticity difference value reflects the degree of chromaticity difference between edge pixels and surrounding pixels. Then, a continuity score is calculated using an inverse proportional function, with the following formula:
[0111]
[0112] in, It is a constant used to adjust the overall range of continuous scoring. The value should be a very small positive number to avoid a denominator of zero. Through this calculation, the smaller the average chromaticity difference value, the higher the continuity score, indicating better continuity of edge chromaticity; conversely, the larger the average chromaticity difference value, the lower the continuity score, indicating poorer continuity of edge chromaticity.
[0113] Next, based on the continuity score, a base adjustment coefficient is generated using a pre-defined mapping rule. For example, the continuity score is divided into several intervals, each corresponding to a range of base adjustment coefficient values. When the continuity score is in a lower interval, a smaller base adjustment coefficient is generated, meaning a larger adjustment is needed to the edge chromaticity; when the continuity score is in a higher interval, a larger base adjustment coefficient is generated, meaning a smaller adjustment or no adjustment is needed to the edge chromaticity. The specific mapping rule can be optimized and determined based on actual image processing needs and experimental results.
[0114] Finally, the basic tone correction parameters, texture chromaticity balance parameters, and basic adjustment coefficients are fused using a weighted summation method. The weighting coefficients can be dynamically adjusted according to different image types, processing requirements, and other factors to achieve precise modulation of the edge chromaticity adjustment parameters. This results in edge chromaticity adjustment parameters that are most suitable for the high-frequency edge components of the current image, making the chromaticity of the adjusted image more continuous and natural at high-frequency edges, thus improving the overall image quality.
[0115] 218. Use the basic tone correction parameters to perform basic tone correction on the low-frequency tone components to obtain the target low-frequency components;
[0116] 219. Use texture chromaticity balance parameters to balance and correct the mid-frequency texture components to obtain the target mid-frequency components;
[0117] 220. Use edge chromaticity adjustment parameters to perform edge correction on high-frequency edge components to obtain the target high-frequency components;
[0118] 221. Generate the target frequency domain feature matrix based on the target's low-frequency component, target's mid-frequency component, and target's high-frequency component;
[0119] Optionally, in this embodiment, the basic tone correction parameter reflects the overall adjustment trend of the image in terms of tone and is set based on the analysis and adjustment requirements of the overall tone of the image. During the correction process, the basic tone correction parameter is calculated with the low-frequency tone component, which can be done by matrix element multiplication, addition, or other operations. The texture chromaticity balance parameter focuses on balancing the chromaticity differences between different texture regions in the image. When processing the mid-frequency texture component, the elements representing the chromaticity of different texture regions within this frequency band are analyzed and adjusted according to the texture chromaticity balance parameter. The chromaticity difference between different texture regions is calculated by an algorithm, and then the mid-frequency texture component elements corresponding to regions with high or low chromaticity are adjusted according to the balance requirements. The edge chromaticity adjustment parameter is determined by performing edge chromaticity continuity analysis on the high-frequency edge component, and its purpose is to solve the problem of chromaticity discontinuity at the high-frequency edges of the image. During the correction process, the edge chromaticity adjustment parameter is applied to the elements corresponding to the edge pixels and their neighboring pixels in the high-frequency edge component. For the values of each edge pixel and its neighboring pixels in the high-frequency edge component, the corresponding adjustments are made according to the edge chromaticity adjustment parameter. The three frequency band components, after the above corrections, are combined according to the original frequency band division order and position to form a new matrix structure, namely the target frequency domain feature matrix. This matrix integrates the adjusted low-frequency hue, mid-frequency texture, and high-frequency edge information, and contains the optimization results of the overall image hue, texture details, and edge chromaticity continuity.
[0120] 222. Perform inverse frequency domain transformation on the target frequency domain feature matrix to generate the target image.
[0121] Step 222 in this embodiment is the same as described above. Figure 1 Step 106 in the illustrated embodiment is similar and will not be described again here.
[0122] Please see Figure 3 As shown, one embodiment of the image chroma adjustment system based on AI algorithms in this application includes:
[0123] The frequency domain decomposition unit 301 is used to perform frequency domain decomposition on the image to be processed and generate an initial frequency domain feature matrix, which includes low-frequency tone components, mid-frequency texture components and high-frequency edge components.
[0124] Extraction unit 302 is used to extract low-frequency chromaticity features of low-frequency hue components and mid-frequency chromaticity features of mid-frequency texture components;
[0125] The input unit 303 is used to input low-frequency chromaticity features and mid-frequency chromaticity features into a preset frequency band specific adjustment model, and output the basic hue correction parameters of the low-frequency chromaticity components and the texture chromaticity balance parameters of the mid-frequency texture components.
[0126] Analysis unit 304 is used to perform edge chromaticity continuity analysis on high-frequency edge components based on basic hue correction parameters and texture chromaticity balance parameters, and to determine edge chromaticity adjustment parameters for high-frequency edge components based on the edge chromaticity continuity analysis results;
[0127] The action unit 305 is used to apply the basic tone correction parameters, texture chromaticity balance parameters and edge chromaticity adjustment parameters to the corresponding frequency band components in the initial frequency domain feature matrix to obtain the target frequency domain feature matrix.
[0128] The processing unit 306 is used to perform inverse frequency domain transformation on the target frequency domain feature matrix to generate a target image.
[0129] Please see Figure 4 As shown, this application provides an electronic photo frame, including:
[0130] Processor 401, memory 402, input / output unit 403, and bus 404;
[0131] The processor 401 is connected to the memory 402, the input / output unit 403, and the bus 404;
[0132] The memory 402 stores a program, and the processor 401 calls the program to execute it, such as... Figure 1 , Figure 2-1 , Figure 2-2 as well as Figure 2-3 The method in the middle.
[0133] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0134] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0135] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0136] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0137] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. An image chroma adjustment method based on AI algorithm, characterized in that, include: The image to be processed is decomposed in the frequency domain to generate an initial frequency domain feature matrix, which includes low-frequency tone components, mid-frequency texture components, and high-frequency edge components. Extract the low-frequency chromaticity features of the low-frequency hue component and the mid-frequency chromaticity features of the mid-frequency texture component; The low-frequency chromaticity features and the mid-frequency chromaticity features are input into a preset frequency band specific adjustment model, and the basic hue correction parameters of the low-frequency chromaticity components and the texture chromaticity balance parameters of the mid-frequency texture components are output. Based on the basic tone correction parameters and the texture chromaticity balance parameters, an edge chromaticity continuity analysis is performed on the high-frequency edge components, and the edge chromaticity adjustment parameters of the high-frequency edge components are determined according to the edge chromaticity continuity analysis results. The basic tone correction parameter, the texture chromaticity balance parameter, and the edge chromaticity adjustment parameter are applied to the corresponding frequency band components in the initial frequency domain feature matrix to obtain the target frequency domain feature matrix; The target frequency domain feature matrix is subjected to inverse frequency domain transformation to generate the target image.
2. The image chroma adjustment method based on AI algorithm as described in claim 1, characterized in that, The extraction of low-frequency chromaticity features of the low-frequency hue component and mid-frequency chromaticity features of the mid-frequency texture component includes: The initial frequency domain feature matrix is converted to the HSV color space; The region of the low-frequency hue component in the HSV color space is defined as the low-frequency region, and the region of the mid-frequency texture component in the HSV color space is defined as the mid-frequency region. The low-frequency chromaticity features of the low-frequency hue component are obtained by calculating the average chromaticity, standard deviation of chromaticity, average saturation, and standard deviation of saturation of all pixels in the low-frequency region. The gradient and orientation of all pixels within the mid-frequency region are calculated to obtain the mid-frequency chromaticity features of the mid-frequency texture component.
3. The image chroma adjustment method based on AI algorithm as described in claim 1, characterized in that, Before inputting the low-frequency chromaticity features and the mid-frequency chromaticity features into the preset frequency band specific adjustment model, the method further includes: Collect sample images of several different types; Calculate the low-frequency chromaticity features of the sample low-frequency hue component and the mid-frequency chromaticity features of the sample mid-frequency texture component in each sample image; The low-frequency chromaticity features and mid-frequency chromaticity features of all sample images are used as training sample sets. Preset chromaticity deviation threshold and preset color uniformity threshold are used as labels. The basic hue correction parameters of the low-frequency chromaticity components and the texture chromaticity balance parameters of the mid-frequency texture components are used as predicted values. The pre-trained model based on convolutional neural network is iteratively trained. The pre-trained model that has completed training is determined to be a preset frequency band-specific adjustment model.
4. The image chroma adjustment method based on AI algorithm as described in claim 1, characterized in that, The step of performing edge chromaticity continuity analysis on the high-frequency edge components based on the basic hue correction parameters and the texture chromaticity balance parameters, and determining the edge chromaticity adjustment parameters of the high-frequency edge components based on the edge chromaticity continuity analysis results, includes: Obtain all edge pixels and neighboring pixels within the high-frequency edge component, where the neighboring pixels are pixels in the region adjacent to the edge pixels; Calculate the average chromaticity difference between the edge pixel and the neighboring pixel; A continuity score is calculated based on the average chromaticity difference value; Based on the aforementioned continuous scoring, a basic adjustment coefficient is generated; The basic adjustment coefficients are modulated using the basic tone correction parameters and the texture chromaticity balance parameters to obtain the edge chromaticity adjustment parameters.
5. The image chroma adjustment method based on AI algorithm according to claim 1, characterized in that, The step of performing frequency domain decomposition on the image to be processed to generate an initial frequency domain feature matrix includes: Obtain the raw chromaticity data of the image to be processed; The original chromaticity data is standardized to obtain the original chromaticity matrix; The original chromaticity matrix is decomposed into a multi-scale frequency domain using the small Bode transform algorithm to generate an initial frequency domain feature matrix.
6. The image chroma adjustment method based on AI algorithm according to any one of claims 1 to 5, characterized in that, The step of applying the basic tone correction parameters, the texture chromaticity balance parameters, and the edge chromaticity adjustment parameters to the corresponding frequency band components in the initial frequency domain feature matrix to obtain the target frequency domain feature matrix includes: The low-frequency tone component is corrected using the aforementioned basic tone correction parameters to obtain the target low-frequency component. The mid-frequency texture component is balanced and corrected using the texture chromaticity balance parameter to obtain the target mid-frequency component. The high-frequency edge component is corrected using the edge chromaticity adjustment parameters to obtain the target high-frequency component. A target frequency domain feature matrix is generated based on the target low-frequency component, the target mid-frequency component, and the target high-frequency component.
7. An image chroma adjustment system based on AI algorithms, characterized in that, include: The frequency domain decomposition unit is used to perform frequency domain decomposition on the image to be processed and generate an initial frequency domain feature matrix, which includes low-frequency tone components, mid-frequency texture components and high-frequency edge components. An extraction unit is used to extract the low-frequency chromaticity features of the low-frequency hue component and the mid-frequency chromaticity features of the mid-frequency texture component; The input unit is used to input the low-frequency chromaticity features and the mid-frequency chromaticity features into a preset frequency band specific adjustment model, and output the basic hue correction parameters of the low-frequency chromaticity components and the texture chromaticity balance parameters of the mid-frequency texture components. The analysis unit is used to perform edge chromaticity continuity analysis on the high-frequency edge components based on the basic hue correction parameters and the texture chromaticity balance parameters, and to determine the edge chromaticity adjustment parameters of the high-frequency edge components based on the edge chromaticity continuity analysis results. The action unit is used to apply the basic tone correction parameter, the texture chromaticity balance parameter and the edge chromaticity adjustment parameter to the corresponding frequency band components in the initial frequency domain feature matrix to obtain the target frequency domain feature matrix. The processing unit is used to perform inverse frequency domain transformation on the target frequency domain feature matrix to generate a target image.
8. The image chroma adjustment system based on AI algorithm according to claim 7, characterized in that, The extraction unit is specifically used for: The initial frequency domain feature matrix is converted to the HSV color space; The region of the low-frequency hue component in the HSV color space is defined as the low-frequency region, and the region of the mid-frequency texture component in the HSV color space is defined as the mid-frequency region. The average chromaticity, standard deviation of chromaticity, average saturation, and standard deviation of saturation of all pixels in the low-frequency region and all pixels in the mid-frequency region are calculated respectively to obtain the low-frequency chromaticity features of the low-frequency hue component and the mid-frequency chromaticity features of the mid-frequency texture component.
9. The image chroma adjustment system based on AI algorithm according to claim 7, characterized in that, The AI-based image color adjustment system also includes: The collection unit is used to collect several different types of sample images; The calculation unit is used to calculate the sample low-frequency chromaticity features corresponding to the sample low-frequency hue component and the sample mid-frequency chromaticity features corresponding to the sample mid-frequency texture component in each sample image. The training unit is used to take the low-frequency chromaticity features and mid-frequency chromaticity features of all sample images as the training sample set, the preset chromaticity deviation threshold and preset color uniformity threshold as labels, and the basic tone correction parameters of the low-frequency chromaticity components and the texture chromaticity balance parameters of the mid-frequency texture components as prediction values to iteratively train the pre-trained model based on the convolutional neural network. A determining unit is used to determine that the pre-trained model after training is a preset frequency band specific adjustment model.
10. An electronic photo frame, characterized in that, include: Processor, memory, input / output units, and bus; The processor is connected to the memory, the input / output unit, and the bus; The memory stores a program, which the processor calls to execute the image chroma adjustment method based on the AI algorithm as described in any one of claims 1 to 6.