Color migration method and device for automatically predicting toning parameters

Through the combination of neural network prediction and manual adjustment, the problem of insufficient color tuning parameters changes in the color migration process in the prior art is solved, and the fine control of color migration and the finding of optimal parameter combinations is realized.

CN119625109APending Publication Date: 2025-03-14CHENGDU SOBEY DIGITAL TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411848064.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The existing color migration technology is difficult to fully demonstrate the specific changes in various color parameters such as color temperature, tone, saturation, etc., which limits the user's ability to finely adjust the final color migration result. The complex interaction between different color tuning parameters makes it difficult to obtain an ideal color migration effect for simple parameter adjustments.

Method used

Through neural network-based training, the depth features of the original image and the target style image are extracted using a pre-trained model, and the color matching parameters are predicted through the fusion of features, color migration is achieved, and the color matching parameter combination is optimized through manual adjustment.

Benefits of technology

It is realized that during the color migration process, the mutual influence between multiple color tuning parameters is considered, and the optimal color tuning parameter combination can be found, which can control color changes more finely, improve the effect of color migration and user adjustment capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119625109A_ABST
    Figure CN119625109A_ABST
Patent Text Reader

Abstract

The invention discloses a color migration method and device for automatically predicting toning parameters, and relates to the technical field of computer vision, and the method comprises the steps: firstly setting the toning parameters, inputting an original image and a style image into a pre-trained neural network for prediction, and obtaining an optimal toning parameter and a color migration result graph; and then adjusting the optimal toning parameter based on the color migration result graph to obtain an optimized toning parameter, generating a lookup table based on the optimized toning parameter, and finally performing color migration on the original image based on the lookup table to obtain a color migration image. Through training based on a neural network, depth features of an original image and a target style image are extracted by using a pre-trained model, and color modulation parameters are predicted through feature fusion, so that color migration is realized, mutual influence among a plurality of color modulation parameters can be considered, and an optimal color modulation parameter combination can be found. And the color change can be more finely controlled in a mode of combining a neural network and manual adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer vision technology, and in particular to a color migration method and device for automatically predicting color adjustment parameters. Background Art

[0002] Color transfer technology is an image processing method used to copy the color characteristics of a source image to a target image. This technology analyzes the color distribution characteristics of the source image and adjusts the color of the target image accordingly, so that the latter can present a similar visual effect to the former. Color transfer technology not only enriches the artistic expression of image processing, but is also widely used in many fields such as film special effects production, digital image synthesis, old photo restoration and image quality enhancement, greatly improving the diversity and artistry of image processing effects.

[0003] Existing color migration technologies are mainly based on statistical methods, mathematical optimization algorithms, and deep learning models. For example, histogram matching is a common statistical method that achieves color migration by making the histogram of the target image as close as possible to the histogram of the source image. In addition, there are methods that globally or locally adjust the color of the target image by solving specific optimization problems, as well as deep learning methods that use neural networks to learn color conversion rules from large amounts of data. The development of these technologies has greatly promoted the popularization of color migration applications.

[0004] However, although the existing color migration algorithms are relatively mature, they still face some challenges in practical applications. In particular, most existing algorithms cannot fully display the specific changes of various color parameters such as color temperature, hue, saturation, etc. involved in the color migration process, which limits the user's ability to fine-tune the final color migration result. In addition, during the color migration process, there may be complex interactions between different color adjustment parameters, making it difficult to achieve the ideal color migration effect with simple parameter adjustments. Therefore, how to effectively solve the above problems has become one of the technical problems that technicians in this field need to solve urgently. Summary of the invention

[0005] The purpose of this application is to provide a color migration method and device for automatically predicting color parameters in order to overcome the existing technical defects. Through neural network-based training, a pre-trained model is used to extract the deep features of the original image and the target style image, and the color parameters are predicted by fusion of the features, thereby realizing color migration. The mutual influence between multiple color parameters can be considered to find the optimal combination of color parameters. The combination of neural network and manual adjustment can more finely control color changes.

[0006] The purpose of this application is achieved through the following technical solutions:

[0007] In a first aspect, the present application proposes a color migration method for automatically predicting color adjustment parameters, the method comprising:

[0008] Step S1, setting color adjustment parameters for color migration;

[0009] Step S2: inputting the original image and the style image into a pre-trained neural network for prediction based on the color adjustment parameters to obtain the optimal color adjustment parameters and the color migration result map;

[0010] Step S3, adjusting the best color adjustment parameters based on the color migration result graph to obtain optimized color adjustment parameters;

[0011] Step S4, generating a lookup table based on the optimized color adjustment parameters;

[0012] Step S5: performing color migration on the original image based on the lookup table to obtain a color migrated image.

[0013] In a possible embodiment, the color adjustment parameters include brightness, color temperature, hue, saturation, contrast, and Gamma.

[0014] In a possible embodiment, step S2 further includes:

[0015] The similarity between the color transfer result image and the original image and style image is evaluated by the loss function. The calculation formula of the loss function Loss is: Loss = W c ×L c +W s ×L s +W h ×L h , Loss is the total loss, W c , W s , W h They are the original image loss weight, style image loss weight, and color histogram loss weight, respectively. c , L s , L h They are original image loss, style image loss and color histogram loss respectively.

[0016] In one possible embodiment, the original image loss L c and style image loss L s The mean square error is used as the image similarity evaluation index. The calculation formula of the mean square error MSE is: Where m, n are the length and width of the image, I and K are the images to be calculated, and i, j are the coordinates of the pixels in the image.

[0017] In one possible embodiment, the color histogram loss L h The calculation uses the KL divergence method: Where c is the color channel number of the image, H sc ,H nc are the normalized style map histogram of image channel c and the color histogram of the color migration result map, X is the histogram scale range, x is any value within the histogram scale range, H sc (x) and H nc (x) is H sc and H nc The number of pixels whose pixel value is x.

[0018] In a possible embodiment, step S4 includes:

[0019] Sampling is performed based on the RGB sampling space and sampling interval, and the color value of each sampling point is calculated through the color adjustment parameters to obtain the color value;

[0020] After normalizing the color values, the three-dimensional array is stored to obtain a lookup table.

[0021] In a possible embodiment, step S5 includes:

[0022] Query the corresponding position of each pixel value in the original image in the lookup table;

[0023] Interpolate the pixel values ​​at the sampling points that are not in the lookup table to obtain the target color value;

[0024] In a possible embodiment, a color shifted image is obtained.

[0025] In a second aspect, the present application also provides a color migration device for automatically predicting color adjustment parameters, the device comprising:

[0026] A setting module for setting color adjustment parameters for color migration;

[0027] A prediction module is used to input the original image and the style image into a pre-trained neural network for prediction based on the color adjustment parameters to obtain the optimal color adjustment parameters and color migration result map;

[0028] An adjustment module, used for adjusting the best color adjustment parameters based on the color migration result graph to obtain optimized color adjustment parameters;

[0029] A generation module, used for generating a lookup table based on the optimized color adjustment parameters;

[0030] The color migration module is used to perform color migration on the original image based on the lookup table to obtain a color migrated image.

[0031] In a possible embodiment, the generating module is further used for:

[0032] Sampling is performed based on the RGB sampling space and sampling interval, and the color value of each sampling point is calculated through the color adjustment parameters to obtain the color value;

[0033] After normalizing the color values, the three-dimensional array is stored to obtain a lookup table.

[0034] In a possible embodiment, the color migration module is further used for:

[0035] Query the corresponding position of each pixel value in the original image in the lookup table;

[0036] Interpolate the pixel values ​​at the sampling points that are not in the lookup table to obtain the target color value;

[0037] The target color value replaces the corresponding pixel value in the original image to complete the color migration and obtain a color migrated image.

[0038] The above-mentioned main scheme of the present application and its further options can be freely combined to form multiple schemes, all of which are schemes that can be adopted and claimed for protection in the present application; and in the present application, (non-conflicting options) options and other options can also be freely combined. After understanding the scheme of the present application, those skilled in the art can understand that there are multiple combinations based on the prior art and common knowledge, all of which are technical schemes to be protected by the present application, and they are not exhaustively listed here.

[0039] The present application discloses a color migration method and device for automatically predicting color parameters, which relates to the field of computer vision technology. The color parameters are first set, and the original image and style image are input into a pre-trained neural network for prediction to obtain the best color parameters and color migration result map. Then, the best color parameters are adjusted based on the color migration result map to obtain optimized color parameters, and a lookup table is generated based on the optimized color parameters. Finally, the original image is color migrated based on the lookup table to obtain a color migrated image. Through neural network-based training, the deep features of the original image and the target style image are extracted using a pre-trained model, and the color parameters are predicted by fusion of the features, thereby achieving color migration. The mutual influence between multiple color parameters can be considered to find the optimal combination of color parameters. The combination of neural network and manual adjustment can more finely control color changes. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1A schematic flow chart of a color migration method for automatically predicting color adjustment parameters proposed in an embodiment of the present application is shown.

[0042] Figure 2 A neural network prediction diagram proposed in an embodiment of the present application is shown.

[0043] Figure 3 The result of the image processing proposed in the embodiment of the present application is shown. DETAILED DESCRIPTION

[0044] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0045] Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative work shall fall within the scope of protection of this application.

[0046] In the existing technology, color migration algorithms generally cannot show the degree of change of various color parameters such as color temperature, hue, saturation, etc. during the color migration process, and it is difficult to further make targeted adjustments and selectively control the color changes during the color migration process based on the results of color migration. At the same time, using neural networks to train color adjustment parameters can handle the situation where different color adjustment parameters influence each other and find the optimal parameter value to achieve the color migration effect.

[0047] Therefore, in order to solve the above-mentioned technical problems, the embodiments of the present application propose a color migration method and device for automatically predicting color adjustment parameters, and train a neural network. The color adjustment parameters can be used to realize the color change during the color migration process, so that the optimal color adjustment parameter value can be obtained when multiple color adjustment parameters influence each other, and can be further adjusted. This can solve the problems of the user's lack of intuitive perception of the color migration process and control over the details of color changes, and the difficulty in obtaining the optimal parameter value when the color adjustment parameters influence each other. It is described in detail below.

[0048] Please refer to Figure 1 , Figure 1 A schematic flow chart of a color migration method for automatically predicting color adjustment parameters proposed in an embodiment of the present application is shown, and the method comprises the following steps:

[0049] Step S1, setting color adjustment parameters for color migration.

[0050] Color grading parameters include brightness, color temperature, hue, saturation, contrast and gamma.

[0051] In the process of color migration, the color adjustment parameters determine the effect of color migration, including the brightness, coldness, warmth, and vividness of the color. In the color adjustment parameters, brightness is the overall brightness of the image. A higher brightness value will make the image look brighter, while a lower brightness value will make the image appear darker. Color temperature is to adjust the coldness and warmth of the image. Hue is to adjust the type of color in the image. Saturation is to adjust the purity or vividness of the color in the image. Contrast is to adjust the difference between the bright and dark parts of the image. Gamma is to adjust the nonlinear brightness curve of the image, which is used to correct the nonlinear characteristics of the display device so that the image looks more consistent on different display devices.

[0052] Step S2: Based on the color adjustment parameters, the original image and the style image are input into a pre-trained neural network for prediction to obtain the optimal color adjustment parameters and the color migration result map.

[0053] Figure 2 The neural network prediction graph proposed in the embodiment of the present application is shown. The style image and the original image are processed by the neural network to generate a series of parameters (parameter 1 to parameter n). The generated parameters are manually adjusted and the manually adjusted parameters are processed by LUT (lookup table). Finally, the processed parameters are color migrated with the original image to generate the final color migration effect graph.

[0054] During the color transfer process, the original image and the style image are input into the neural network for training and prediction of color adjustment parameters, ensuring that the generated image can retain the content structure of the original image while adopting the color style of the style image.

[0055] During the training of the neural network, the pre-trained VGG model can be used to downsample the style image and the original image to reduce the amount of calculation while retaining the main feature information. The deep color features of the downsampled style image and the original image are then extracted through the VGG model. Features of different scales are extracted from different layers of the VGG model to capture the local and global information of the image. Features of different scales are then fused to generate a richer feature representation. This step can be achieved through convolution operations, pooling operations, or attention mechanisms. The feature map obtained by feature fusion is sent to a fully connected layer or regression layer to generate color adjustment parameters. The initial value of the color adjustment parameter can be random or set based on prior knowledge.

[0056] Apply the generated color adjustment parameters to the original image to generate the image after color transfer, calculate the loss between the generated image and the target style image, calculate the gradient of the loss function to the color adjustment parameters, update the color adjustment parameters by the gradient descent method, gradually reduce the loss function, and repeat the forward propagation and back propagation process until the loss function converges or reaches the predetermined number of training rounds. During the training process, multiple color adjustment parameter combinations may be generated. By evaluating the quality of the generated image, the color adjustment parameter combination that can achieve the best color transfer effect is selected, and the optimal color adjustment parameters are applied to the original image to generate the final color transfer result.

[0057] Step S2 can effectively transfer the color style of the original image to the color style of the target style image. The whole process includes not only the initialization and training of the color adjustment parameters, but also the setting of the loss function and the output of the final result, ensuring that the generated image retains the content structure of the original image and has the color characteristics of the target style.

[0058] Step S2 also includes:

[0059] The similarity between the color transfer result image and the original image and style image is evaluated by the loss function. The calculation formula of the loss function Loss is: Loss = W c ×L c +W s ×L s +W h ×L h , Loss is the total loss, W c , W s , W h They are the original image loss weight, style image loss weight, and color histogram loss weight, respectively. c , L s , L h They are original image loss, style image loss and color histogram loss respectively.

[0060] The relevant weights of the loss function are constructed by weighted summing of different types of losses, which are used to measure the similarity between the generated image and the original image and the style image. Specifically, the loss function includes the original image MSE loss, the style image MSE loss, and the color histogram loss. In addition, the specific values ​​of the weights need to be adjusted according to the actual application scenarios and experimental results to achieve the best color migration effect.

[0061] Original image loss L c and style image loss L s The mean square error is used as the image similarity evaluation index. The calculation formula of the mean square error MSE is: Where m, n are the length and width of the image, I and K are the images to be calculated, and i, j are the coordinates of the pixels in the image.

[0062] Color histogram loss L h The calculation uses the KL divergence method: Where c is the color channel number of the image, H sc ,H nc are the normalized style map histogram of image channel c and the color histogram of the color migration result map, X is the histogram scale range, x is any value within the histogram scale range, H sc (x) and H nc (x) is H sc and H nc The number of pixels whose pixel value is x.

[0063] Step S3: adjusting the best color adjustment parameters based on the color migration result graph to obtain optimized color adjustment parameters.

[0064] The user needs to observe the effect of color migration and further manually adjust the predicted color parameters to fine-tune the color migration results to make them more in line with the user's expectations. First, the user needs to view the color migration result map generated by the color parameters predicted by the neural network. The user evaluates the quality of the color migration result map and checks whether the expected style effect is achieved. If the result is satisfactory, it can be used directly; if not, enter the manual adjustment stage. The color adjustment parameters include brightness, color temperature, hue, saturation, contrast, etc., which can directly affect the effect of color migration. Users can manually adjust these parameters through the graphical user interface (GUI) or command line tools. After adjusting the parameters, the system will generate a new color migration result map in real time for users to view immediately.

[0065] Adjust between the original image and the color migration result. If the color migration effect is too strong, the user can reduce the value of certain color adjustment parameters (such as saturation and contrast) to make the result closer to the original image. If the color migration effect is not obvious enough, the user can increase the value of certain color adjustment parameters to make the result closer to the target style image. In addition, users can adjust specific color adjustment parameters according to their personal preferences to achieve unique visual effects. Through different combinations of color adjustment parameters, users can try multiple styles and find the most satisfactory color migration effect.

[0066] Step S4: Generate a lookup table based on the optimized color adjustment parameters.

[0067] The specific method of generating LUT (lookup table) based on color grading parameters is: sampling in 8-bit RGB space according to the set sampling interval, normalizing the sampled color values ​​after color grading parameter calculation, and finally storing them in a three-dimensional array to form a standard LUT. This LUT can be used in various color grading software.

[0068] In a possible embodiment, step S4 includes:

[0069] Sampling is performed based on the RGB sampling space and sampling interval, and the color value of each sampling point is calculated through the color adjustment parameters to obtain the color value;

[0070] After normalizing the color values, the three-dimensional array is stored to obtain a lookup table.

[0071] First, sampling is performed based on the RGB sampling space and sampling interval. In order to reduce the amount of calculation, all colors are usually not sampled, but sampled at a certain interval, such as selecting a sampling interval of 33 or 65. Sampling is performed at the set interval in each dimension to generate a three-dimensional grid. The color value of each sampling point is calculated by the color adjustment parameter to obtain the color value. The color adjustment parameter is used to calculate the color value of each sampling point to generate a new color value. Then, the brightness of each color channel is adjusted to change the overall temperature of the color, making the image warmer or colder, and adjusting the main color tone. The calculated new color value is normalized to the range of 0 to 255. If the calculation result exceeds this range, it needs to be cropped or scaled, and then the normalized color value is stored in a three-dimensional array. The size of this array depends on the sampling interval. The lookup table is used to quickly find and apply color transformations. In practical applications, the color value in the LUT can be applied to any color through interpolation.

[0072] Step S5: performing color migration on the original image based on the lookup table to obtain a color migrated image.

[0073] Use the generated LUT (lookup table) to perform color migration on the original image. For each pixel value of the original image, look up and interpolate the corresponding color value of the color migration in the LUT. The generated LUT is only applicable to the original image or video for training, and is not generally applicable to images or videos of other color styles.

[0074] In a possible embodiment, step S5 includes:

[0075] Query the corresponding position of each pixel value in the original image in the lookup table;

[0076] Interpolate the pixel values ​​at the sampling points that are not in the lookup table to obtain the target color value;

[0077] In a possible embodiment, a color shifted image is obtained.

[0078] Each pixel of the original image is composed of the values ​​of three channels, RGB, and the value range of each channel is 0 to 255. For each pixel in the image, extract its RGB value, search in the LUT, and find the corresponding index in the LUT according to the RGB value of the original pixel. Since the sampling interval of the LUT is usually greater than 1, the RGB value of the original pixel may not be at the sampling point of the LUT. Therefore, interpolation is required to obtain a more accurate color value.

[0079] The new RGB value obtained by interpolation is the color value after color migration. The new RGB value is assigned to the original pixel to complete the color migration. The generated LUT is based on specific color adjustment parameters and training data, so it is only applicable to the original image or video for training. In addition, for images or videos of other color styles, LUT may not achieve the expected color migration effect. If you need to apply it to images or videos of different styles, you need to regenerate the corresponding LUT.

[0080] Figure 3 The results of the image processing proposed in the embodiment of the present application are shown, including the original image, the style image, the color migration result map, the corresponding adjustment parameters, the result after manual adjustment, and the parameters after manual adjustment. Each part shows a different image processing effect and the corresponding parameter adjustment.

[0081] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0082] First, using LUT for color migration can significantly increase processing speed, because LUT lookup and interpolation operations are very efficient, avoiding complex real-time calculations. In addition, due to the fast LUT lookup and interpolation speed, it can be applied in video streams or real-time image processing to achieve instant color adjustment effects.

[0083] Second, through the pre-generated LUT, the color changes of each pixel can be precisely controlled to ensure the consistency and accuracy of color adjustment. The use of interpolation methods can achieve smooth color transitions, avoid color mutations, and enhance visual effects.

[0084] Third, different LUTs can be generated according to different needs and styles, supporting a combination of multiple color adjustment parameters such as brightness, color temperature, hue, saturation, etc. This allows users to make personalized color adjustments according to specific needs and adapt to different application scenarios.

[0085] Fourth, the LUT generation process can be automated, reducing the workload of manual color grading and improving work efficiency. The generated LUT can be easily integrated into various color grading software and tools for easy user use and management.

[0086] Fifth, compared with real-time calculations, LUTs take up less memory and are suitable for use on resource-constrained devices. The computational complexity of LUT lookup and interpolation operations is low, which can save computing resources and reduce hardware requirements.

[0087] A possible implementation of a color migration device for automatically predicting color adjustment parameters is provided below, which is used to execute the various execution steps and corresponding technical effects of the color migration method for automatically predicting color adjustment parameters shown in the above embodiments and possible implementations. The device includes:

[0088] A setting module for setting color adjustment parameters for color migration;

[0089] A prediction module is used to input the original image and the style image into a pre-trained neural network for prediction based on the color adjustment parameters to obtain the optimal color adjustment parameters and color migration result map;

[0090] An adjustment module, used for adjusting the best color adjustment parameters based on the color migration result graph to obtain optimized color adjustment parameters;

[0091] A generation module, used for generating a lookup table based on the optimized color adjustment parameters;

[0092] The color migration module is used to perform color migration on the original image based on the lookup table to obtain a color migrated image.

[0093] In a possible embodiment, the generating module is further used for:

[0094] Sampling is performed based on the RGB sampling space and sampling interval, and the color value of each sampling point is calculated through the color adjustment parameters to obtain the color value;

[0095] After normalizing the color values, the three-dimensional array is stored to obtain a lookup table.

[0096] In a possible embodiment, the color migration module is further used for:

[0097] Query the corresponding position of each pixel value in the original image in the lookup table;

[0098] Interpolate the pixel values ​​at the sampling points that are not in the lookup table to obtain the target color value;

[0099] The target color value replaces the corresponding pixel value in the original image to complete the color migration and obtain a color migrated image.

[0100] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A color migration method for automatically predicting color adjustment parameters, characterized in that: The method comprises: Step S1, setting color adjustment parameters for color migration; Step S2: inputting the original image and the style image into a pre-trained neural network for prediction based on the color adjustment parameters to obtain the optimal color adjustment parameters and the color migration result map; Step S3, adjusting the best color adjustment parameters based on the color migration result graph to obtain optimized color adjustment parameters; Step S4, generating a lookup table based on the optimized color adjustment parameters; Step S5: performing color migration on the original image based on the lookup table to obtain a color migrated image.

2. The color migration method according to claim 1, characterized in that: Color grading parameters include brightness, color temperature, hue, saturation, contrast and gamma.

3. The color migration method according to claim 1, characterized in that: Step S2 also includes: The similarity between the color transfer result image and the original image and style image is evaluated by the loss function. The calculation formula of the loss function Loss is: Loss = W c ×L c +W s ×L s +W h ×L h , Loss is the total loss, W c , W s , W h They are the original image loss weight, style image loss weight, and color histogram loss weight, respectively. c , L s , L h They are original image loss, style image loss and color histogram loss respectively.

4. The color migration method according to claim 3, characterized in that: Original image loss L c and style image loss L s The mean square error is used as the image similarity evaluation index. The calculation formula of the mean square error MSE is: Where m, n are the length and width of the image, I and K are the images to be calculated, and i, j are the coordinates of the pixels in the image.

5. The color migration method according to claim 3, characterized in that: Color histogram loss L h The calculation uses the KL divergence method: Where c is the color channel number of the image, H sc ,H nc are the normalized style map histogram of image channel c and the color histogram of the color migration result map, X is the histogram scale range, x is any value within the histogram scale range, H sc (x) and H nc (x) is H sc and H nc The number of pixels whose pixel value is x.

6. The color migration method according to claim 1, characterized in that: Step S4 includes: Sampling is performed based on the RGB sampling space and sampling interval, and the color value of each sampling point is calculated through the color adjustment parameters to obtain the color value; After normalizing the color values, the three-dimensional array is stored to obtain a lookup table.

7. The color migration method according to claim 1, characterized in that: Step S5 includes: Query the corresponding position of each pixel value in the original image in the lookup table; Interpolate the pixel values ​​at the sampling points that are not in the lookup table to obtain the target color value; The target color value replaces the corresponding pixel value in the original image to complete the color migration and obtain a color migrated image.

8. A color migration device for automatically predicting color adjustment parameters, characterized in that: The device comprises: A setting module for setting color adjustment parameters for color migration; A prediction module is used to input the original image and the style image into a pre-trained neural network for prediction based on the color adjustment parameters to obtain the optimal color adjustment parameters and color migration result map; An adjustment module, used for adjusting the best color adjustment parameters based on the color migration result graph to obtain optimized color adjustment parameters; A generation module, used for generating a lookup table based on the optimized color adjustment parameters; The color migration module is used to perform color migration on the original image based on the lookup table to obtain a color migrated image.

9. The color migration device according to claim 8, characterized in that: Generates modules, also used to: Sampling is performed based on the RGB sampling space and sampling interval, and the color value of each sampling point is calculated through the color adjustment parameters to obtain the color value; After normalizing the color values, the three-dimensional array is stored to obtain a lookup table.

10. The color migration device according to claim 8, characterized in that: The color migration module is also used for: Query the corresponding position of each pixel value in the original image in the lookup table; Interpolate the pixel values ​​at the sampling points that are not in the lookup table to obtain the target color value; The target color value replaces the corresponding pixel value in the original image to complete the color migration and obtain a color migrated image.

Citation Information

Cited By

  • Electronic device and method for generating color lookup table

    CN121883617A