Image color migration method, device, storage medium and electronic device

By adopting different color migration strategies based on image brightness and channel differences, the problem of color migration affecting visual effects in the existing technology is solved, and richer color levels and visual expression are achieved.

CN112991153BActive Publication Date: 2024-09-13GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110268008.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-11
Publication Date
2024-09-13
Estimated Expiration
2041-03-11

AI Technical Summary

Technical Problem

In the existing technology, due to the fixed migration method during the color migration process, the visual effect of the image is poor. Especially when the difference in brightness of the image is too large, the original color levels are easily lost and the visual expression is affected.

Method used

Based on the judgment of the brightness value of the image to be processed and the reference image, different migration strategies are used for color migration, including unified adjustment and individual adjustment, to adapt to differences in brightness and channel values, and to improve the flexibility and pertinence of color migration.

Benefits of technology

Through flexible migration strategies and targeted channel processing, the visual effect of the image after color migration is improved, rich color levels and color information are retained, and the visual expressiveness of the image is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112991153B
    Figure CN112991153B
Patent Text Reader

Abstract

The present disclosure provides an image color migration method, device, computer-readable storage medium and electronic device, and relates to the field of image processing technology. Among them, an image color migration method includes: obtaining an image to be processed and a reference image; when it is judged that a brightness preset condition is met according to the brightness value of the image to be processed and the brightness value of the reference image, a first migration strategy is used to perform color migration from the image to be processed to the reference image; when it is judged that the brightness preset condition is not met according to the brightness value of the image to be processed and the brightness value of the reference image, a second migration strategy is used to perform color migration from the image to be processed to the reference image. The present disclosure adopts a migration strategy that is adapted to the brightness difference of the image, which improves the flexibility of image color migration and is conducive to improving the visual effect of the migrated image.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Color migration refers to adjusting the color of image B based on the color of image A, so that the adjusted image B has the color style of image A. In the related art, a relatively fixed method is usually used to migrate colors for different images, which easily affects the visual effect of the migrated image. Summary of the invention

[0003] The present disclosure provides an image color migration method, an image color migration device, a computer-readable storage medium and an electronic device, thereby improving the visual effect of the image after color migration at least to a certain extent.

[0004] According to a first aspect of the present disclosure, there is provided an image color migration method, comprising: acquiring an image to be processed and a reference image; when it is judged according to the brightness value of the image to be processed and the brightness value of the reference image that a brightness preset condition is satisfied, using a first migration strategy to perform color migration from the image to be processed to the reference image; when it is judged according to the brightness value of the image to be processed and the brightness value of the reference image that the brightness preset condition is not satisfied, using a second migration strategy to perform color migration from the image to be processed to the reference image.

[0005] According to a second aspect of the present disclosure, there is provided an image color migration method, comprising: acquiring an image to be processed and a reference image; determining first-category image channels and second-category image channels in each image channel according to the numerical values ​​of each image channel of the image to be processed and the reference image; making a uniform numerical adjustment to all first-category image channels of the image to be processed toward the reference image; and making a separate numerical adjustment to each second-category image channel of the image to be processed toward the reference image.

[0006] According to a third aspect of the present disclosure, there is provided an image color migration device, comprising: an image acquisition module, configured to acquire an image to be processed and a reference image; a first color migration module, configured to, when it is judged that a brightness preset condition is satisfied according to the brightness value of the image to be processed and the brightness value of the reference image, adopt a first migration strategy to perform color migration from the image to be processed to the reference image; and a second color migration module, configured to, when it is judged that the brightness preset condition is not satisfied according to the brightness value of the image to be processed and the brightness value of the reference image, adopt a second migration strategy to perform color migration from the image to be processed to the reference image.

[0007] According to a fourth aspect of the present disclosure, there is provided an image color migration device, comprising: an image acquisition module, configured to acquire an image to be processed and a reference image; an image channel classification module, configured to determine a first category of image channels and a second category of image channels in each image channel according to the numerical values ​​of each image channel of the image to be processed and the reference image; a first color migration module, configured to perform a uniform numerical adjustment on all first category image channels of the image to be processed toward the reference image; and a second color migration module, configured to perform a separate numerical adjustment on each second category image channel of the image to be processed toward the reference image.

[0008] According to a fifth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the image color migration method of the first or second aspect and its possible implementation manner are implemented.

[0009] According to a sixth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the image color migration method of the first or second aspect and its possible implementation method by executing the executable instructions.

[0010] The technical solution disclosed in this disclosure has the following beneficial effects:

[0011] In one scheme, for the two situations where the brightness values ​​of the image to be processed and the reference image meet the preset brightness condition or do not meet the preset brightness condition, the first migration strategy and the second migration strategy are respectively used to perform color migration on the image to be processed, so that the adopted migration strategy is adapted to the brightness difference of the image, thereby improving the flexibility of image color migration and facilitating improving the visual effect of the image after color migration.

[0012] In another scheme, according to the numerical difference between each image channel of the image to be processed and the reference image, the image channels are divided into the first type of image channels and the second type of image channels, and are processed by unified color migration and separate color migration respectively. This improves the pertinence of color migration in different image channels, can achieve sufficient color migration, and retain the numerical distribution characteristics of different channels in the image to be processed to a certain extent, so as to present a richer color scale, which is also conducive to improving the visual effect of the image after color migration.

[0013] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1A flow chart showing an image color migration method in this exemplary embodiment is shown;

[0015] Figure 2 A flowchart showing whether a preset condition is satisfied in this exemplary embodiment is shown;

[0016] Figure 3 A flowchart showing the adjustment of three image channels in this exemplary embodiment is shown;

[0017] Figure 4 A flowchart showing non-brightness channel adjustment in this exemplary embodiment is shown;

[0018] Figure 5 A flowchart showing brightness channel adjustment in this exemplary embodiment is shown;

[0019] Figure 6 A schematic flow chart showing an image color migration method in this exemplary embodiment;

[0020] Figure 7 A flow chart showing another method for image color migration in this exemplary embodiment;

[0021] Figure 8 A schematic structural diagram of an image color migration device in this exemplary embodiment is shown;

[0022] Fig. 9 A schematic structural diagram of another image color migration device in this exemplary embodiment is shown;

[0023] Fig.10 A schematic structural diagram of an electronic device in this exemplary embodiment is shown. DETAILED DESCRIPTION

[0024] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0025] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0026] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the steps. For example, some steps may be decomposed, while some steps may be combined or partially combined, so the actual execution order may change according to the actual situation.

[0027] In the related art, no matter how big the difference in color or brightness is between image A and image B, a fixed method is used for color migration. When the brightness difference between the two images is too large, the original color scale of image B is easily lost after color migration, resulting in a decrease in the visual expression of image B.

[0028] In view of the above problems, an exemplary embodiment of the present disclosure provides an image color migration method, which can be executed by a terminal device or a server. The application scenarios of the image color migration method include but are not limited to: providing a color migration function in the image processing software of the terminal device, when the user inputs the image to be processed and the reference image, the terminal device can execute the image color migration method of this exemplary embodiment, perform color migration on the image to be processed, and output the migrated image; or when the user inputs the image to be processed and the reference image, the terminal device can send the image to be processed and the reference image to the server, and the server executes the image color migration method of this exemplary embodiment, performs color migration on the image to be processed, and feeds back the migrated image.

[0029] Combine the following Figure 1 The image color migration method of this exemplary embodiment is described. Figure 1 An exemplary process of an image color migration method is shown, which may include:

[0030] Step S110, obtaining the image to be processed and the reference image;

[0031] Step S120, when it is determined that the brightness preset condition is satisfied according to the brightness value of the image to be processed and the brightness value of the reference image, a first migration strategy is adopted to perform color migration from the image to be processed to the reference image;

[0032] Step S130: when it is determined that the brightness value of the image to be processed and the brightness value of the reference image do not satisfy the preset brightness condition, a second migration strategy is used to perform color migration from the image to be processed to the reference image.

[0033] Through the above method, for the two situations that the brightness values ​​of the image to be processed and the reference image meet the preset brightness condition or do not meet the preset brightness condition, the first migration strategy and the second migration strategy are respectively adopted to perform color migration on the image to be processed, so that the adopted migration strategy is adapted to the brightness difference of the image, thereby improving the flexibility of image color migration and being beneficial to improving the visual effect of the migrated image.

[0034] The following are Figure 1 Each step in the procedure is described in detail.

[0035] refer to Figure 1 In step S110, the image to be processed and the reference image are obtained.

[0036] Among them, the image to be processed is an image that needs to be color migrated, and the reference image is an image used as a reference for color migration, that is, after the image to be processed is color migrated, the color style should be similar to the reference image. The image to be processed and the reference image can be selected or input by the user. The present disclosure does not limit the number of images to be processed or reference images. For example, the number of images to be processed can be multiple, and this exemplary embodiment performs batch color migration processing on multiple images to be processed. The number of reference images can also be multiple, so that the color features of multiple reference images can be integrated to perform color migration processing. For example, multiple reference images can be collectively referred to as one reference image, and the image to be processed can be color migrated to the synthesized reference image, or the image to be processed can be color migrated to each reference image separately to obtain multiple migrated images.

[0037] In one embodiment, in order to facilitate the subsequent judgment of the brightness value of the image to be processed and the brightness value of the reference image in step S120 or S130, the image to be processed and the reference image may be converted into a color mode containing a brightness channel. For example, if the image to be processed and the reference image initially input are in RGB (RGB is red, green, and blue color channels, respectively) color mode, the image to be processed and the reference image may be converted from RGB to Lab (L is the brightness channel, a and b are two color channels) color mode or HSL (H is the hue channel, S is the saturation channel, and L is the brightness channel) color mode.

[0038] Continue to refer Figure 1 In step S120, when it is determined that the brightness preset condition is met according to the brightness value of the image to be processed and the brightness value of the reference image, a first migration strategy is adopted to perform color migration from the image to be processed to the reference image.

[0039] The brightness preset condition is a condition for measuring whether the brightness difference from the image to be processed to the reference image meets a certain standard. For example, the brightness preset condition can be used to measure whether the brightness value change from the image to be processed to the reference image is too large. In this exemplary embodiment, it can be set that satisfying the brightness preset condition indicates that the brightness value does not change much, and the first migration strategy is adopted, and not satisfying the brightness preset condition indicates that the brightness value changes too much, and the second migration strategy is adopted. Of course, it can also be set to the opposite situation, that is, satisfying the brightness preset condition indicates that the brightness value changes too much, and not satisfying the brightness preset condition indicates that the brightness value does not change much. This exemplary embodiment is described later by taking the example of satisfying the brightness preset condition indicating that the brightness value does not change much.

[0040] The brightness values ​​of the image to be processed and the reference image include the brightness values ​​of each pixel in the image. This exemplary embodiment can perform statistics based on the brightness values ​​of different pixels, and determine whether the preset brightness conditions are met by comparing the statistical results of the brightness values ​​of the image to be processed and the reference image.

[0041] In one embodiment, reference Figure 2 As shown, judging that the brightness preset condition is satisfied based on the brightness channel value of the image to be processed and the brightness channel value of the reference image may include:

[0042] Step S210, obtaining a first brightness statistical value obtained by counting the brightness values ​​of different pixels in the image to be processed, and a second brightness statistical value obtained by counting the brightness values ​​of different pixels in the reference image;

[0043] Step S220: determine whether the difference between the first brightness statistical value and the second brightness statistical value is less than a preset brightness threshold.

[0044] Among them, the brightness statistics are used to reflect the overall brightness level of the image, which can be the brightness average, brightness median, brightness mode, or brightness variance, brightness standard deviation, etc. that reflect the brightness distribution of the image. The first brightness statistics and the second brightness statistics can be the same statistical indicator. For example, the first brightness statistics can be the brightness average of different pixels in the image to be processed, and correspondingly, the second brightness statistics can be the brightness average of different pixels in the reference image; further, it can be determined whether the difference between the two brightness averages is less than the brightness preset threshold to determine whether the brightness value changes too much. The brightness preset threshold can be a standard for measuring whether the difference in brightness statistics is too large, which can be determined based on experience, or can be adaptively adjusted for different image scenes, and the present disclosure does not limit this.

[0045] In one embodiment, the first brightness statistical value may include a first brightness average value and a first brightness variance, and the second brightness statistical value may include a second brightness average value and a second brightness variance. Step S220 may include: determining that the difference between the first brightness average value and the second brightness average value is less than a first brightness preset threshold, and the difference between the first brightness variance and the second brightness variance is less than a second brightness preset threshold. That is, when the brightness average values ​​of the image to be processed and the reference image are not much different, and the brightness value fluctuation amplitude is not much different, it is determined that the brightness preset condition is met. The first brightness preset threshold and the second brightness preset threshold are standards for the difference between the brightness average value and the difference between the brightness variance, respectively, and can be determined based on experience, image scenes, etc.

[0046] In one implementation, the case where the difference between the first brightness statistical value and the second brightness statistical value is equal to the preset brightness threshold can be regarded as a special case where the preset brightness condition is met, or can be regarded as a special case where the preset brightness condition is not met, and the present disclosure does not limit this.

[0047] When the preset brightness condition is met, the first migration strategy is adopted. The first migration strategy may be to completely replace the color style of the image to be processed with the color style of the reference image, including completely adopting the brightness characteristics of the reference image.

[0048] In one implementation, the first migration strategy may be: uniformly adjusting the values ​​of each image channel in the image to be processed toward the reference image, for example, uniformly linearly transforming the values ​​of each image channel in the image to be processed.

[0049] In one embodiment, reference Figure 3 As shown, the above-mentioned first migration strategy is used to migrate the color of the image to be processed to the reference image, which may include:

[0050] Step S310, determining the ternary covariance matrix between three image channels for the image to be processed and the reference image respectively;

[0051] Step S320, determining a first conversion parameter between the image to be processed and the reference image based on the ternary covariance matrix of the image to be processed and the ternary covariance matrix of the reference image;

[0052] Step S330: using the first conversion parameter and the reference image to adjust the values ​​of the three image channels of the image to be processed.

[0053] Among them, the three image channels can be image channels in any color mode, for example, in Lab color mode, the three image channels are L channel, a channel and b channel. In the image to be processed, each pixel includes the values ​​of three image channels, so the covariance can be calculated for any two image channels to obtain a ternary covariance matrix. The ternary covariance matrix refers to the matrix obtained by calculating the covariance of three groups of variables in pairs, which is generally a 3*3 matrix. Taking Lab color mode as an example, the ternary covariance matrix of the image to be processed is as follows:

[0054]

[0055] Where, the subscript u represents the image to be processed. cov() represents the covariance of two variables. When the two variables in the brackets are the same, the covariance is the variance, such as cov(L,L) represents the variance of L. Similarly, the ternary covariance matrix Σ of the reference image can be obtained v , the subscript v represents the reference image.

[0056] The ternary covariance matrix of the image to be processed and the ternary covariance matrix of the reference image are respectively subjected to eigenvalue decomposition, and then the first conversion parameter T1 is calculated according to the eigenvalue and eigenvector as follows:

[0057]

[0058] Among them, T1 is a matrix, D represents a diagonal matrix composed of eigenvalues, and P represents an orthogonal matrix composed of eigenvectors.

[0059] By using the first conversion parameter T1, the value of each image channel of the image to be processed can be transferred and adjusted to the reference image, referring to the following formula:

[0060] imgout=T1(imgin-in)+μref(5)

[0061] Among them, img in To adjust the values ​​of each image channel in the image to be processed, img out is the corresponding adjusted value, μ in With μ ref Represent the average values ​​of each image channel in the processed image and the reference image respectively.

[0062] based on Figure 3 The method of color migration can retain the richer color information in the image to be processed and improve the color migration effect.

[0063] Continue to refer Figure 1In step S130, when it is determined that the brightness value of the image to be processed and the brightness value of the reference image do not satisfy the preset brightness condition, a second migration strategy is used to perform color migration from the image to be processed to the reference image.

[0064] Contrary to step S120, when the brightness preset condition is not satisfied, the second migration strategy is adopted. The second migration strategy may be to partially replace the color style of the image to be processed with the color style of the reference image, and retain part of the brightness features of the image to be processed.

[0065] In one implementation, the second migration strategy may be to uniformly adjust the values ​​of non-brightness channels in the image to be processed toward the reference image, and to individually adjust the values ​​of the brightness channels toward the reference image.

[0066] In one embodiment, reference Figure 4 As shown, the above-mentioned second migration strategy is used to migrate the color of the image to be processed to the reference image, which may include:

[0067] Step S410, determining the binary covariance matrix between two non-brightness channels of the image to be processed and the reference image respectively;

[0068] Step S420, determining a second conversion parameter between the image to be processed and the reference image based on the binary covariance matrix of the image to be processed and the binary covariance matrix of the reference image;

[0069] Step S430: using the second conversion parameter and the reference image to adjust the values ​​of two non-brightness channels of the image to be processed respectively.

[0070] Among them, non-brightness channels refer to other image channels except brightness channels. In Lab color mode, the two non-brightness channels are a channel and b channel. The covariance of the two non-brightness channels is calculated to obtain a binary covariance matrix, which is generally a 2*2 matrix. Taking Lab color mode as an example, the binary covariance matrix of the image to be processed is as follows:

[0071]

[0072] The binary covariance matrix of the processed image and the binary covariance matrix of the reference image are subjected to eigenvalue decomposition respectively, and then the second conversion parameter T2 is calculated according to the eigenvalue and the eigenvector. T2 is also in the form of a matrix, and the difference from the above T1 is that the dimension of the matrix is ​​different.

[0073] By using the second conversion parameter T2, the values ​​of the two non-brightness channels of the image to be processed can be transferred and adjusted to the reference image, and reference can be made to the above formula (5).

[0074] based on Figure 4The method of color migration can also retain the richer color features in the image to be processed without affecting the brightness features.

[0075] In one embodiment, reference Figure 5 As shown, the above-mentioned use of the second migration strategy to perform color migration on the image to be processed may also include:

[0076] Step S510, determining a brightness adjustment parameter based on a ratio between a brightness value of a reference image and a brightness value of an image to be processed;

[0077] Step S520: using the brightness adjustment parameter to adjust the value of the brightness channel of the image to be processed.

[0078] The brightness adjustment parameter is used to indicate the amplitude of the adjustment. When the ratio of the brightness value of the reference image to the brightness value of the image to be processed is greater than 1, it means that the brightness value of the reference image is higher, and the value of the brightness channel of the image to be processed can be adjusted upward, otherwise it can be adjusted downward. The present disclosure does not limit the specific adjustment method, for example, a nonlinear transformation method can be used for adjustment.

[0079] It should be noted that Figure 5 The following is a method for adjusting the value of the brightness channel separately. Figure 4 The methods shown are independent of each other, so the present disclosure is for Figure 4 and Figure 5 There is no restriction on the order of precedence.

[0080] By adjusting the brightness channel separately, even if the brightness value from the image to be processed to the reference image varies greatly, it can be adjusted to a suitable brightness value to achieve effective color migration.

[0081] In one implementation, step S510 may be implemented in the following manner:

[0082] Acquire a third brightness statistical value obtained by counting the brightness values ​​of different pixels in the image to be processed, and a fourth brightness statistical value obtained by counting the brightness values ​​of different pixels in the reference image;

[0083] When the third brightness statistical value is greater than the fourth brightness statistical value, determining a brightness adjustment parameter according to a ratio of the fourth brightness statistical value to the third brightness statistical value and the first compensation value;

[0084] When the third brightness statistical value is less than the fourth brightness statistical value, the brightness adjustment parameter is determined according to a ratio of the fourth brightness statistical value to the third brightness statistical value and the second compensation value.

[0085] The third brightness statistical value and the first brightness statistical value may adopt the same statistical method or different statistical methods, for example, the third brightness statistical value and the first brightness statistical value are both the brightness averages of different pixels in the image to be processed. The fourth brightness statistical value and the third brightness statistical value may be the same statistical indicator.

[0086] The third brightness statistic is greater than the fourth brightness statistic, and the third brightness statistic is less than the fourth brightness statistic, respectively representing two brightness difference conditions between the image to be processed and the reference image. The first compensation value is a value for compensating the ratio of the fourth brightness statistic to the third brightness statistic in the former condition, and the second compensation value is a value for compensating the ratio of the fourth brightness statistic to the third brightness statistic in the latter condition. The first compensation value can be used to increase (or decrease) the amplitude of the brightness adjustment, and the second compensation value has the opposite effect to the first compensation value, and can be used to decrease (or increase) the amplitude of the brightness adjustment. The first compensation value or the second compensation value can compensate the ratio of the fourth brightness statistic to the third brightness statistic in the form of addition, multiplication, exponentiation, etc., and the present disclosure does not limit this.

[0087] In one implementation, the first compensation value and the second compensation value may be regarded as two values ​​of the same coefficient under the above two conditions.

[0088] The relationship between the first compensation value and the second compensation value, as well as the specific numerical setting, are related to the adjustment method adopted. For example, the brightness adjustment parameter is used to linearly adjust the value of the brightness channel of the image to be processed. The third brightness statistical value and the fourth brightness statistical value are both brightness variances. If the third brightness statistical value is greater than the fourth brightness statistical value, it means that the brightness distribution of the image to be processed is more discrete. When performing linear adjustment to the reference image, in order to retain the discreteness of the brightness distribution, a larger first compensation value can be set to increase the numerical discreteness of the brightness channel after multiplying the brightness adjustment parameter; if the third brightness statistical value is less than the fourth brightness statistical value, it means that the brightness distribution of the image to be processed is more concentrated. When performing linear adjustment to the reference image, in order to retain the concentration of the brightness distribution, a smaller second compensation value can be set to reduce the numerical discreteness of the brightness channel after multiplying the brightness adjustment parameter.

[0089] It can be seen that by compensating different values ​​for the ratio between the brightness value of the reference image and the brightness value of the image to be processed, more precise adjustments can be made for different situations.

[0090] In one implementation, step S520 may be implemented in the following manner:

[0091] The brightness adjustment parameter is used as an exponent to adjust the value of the brightness channel of the image to be processed through a power function relationship.

[0092] Generally, after normalizing the brightness channel value of the image to be processed, the overall upward or downward adjustment can be performed through a power function relationship. During the adjustment process, the brightness distribution characteristics of the image to be processed can be retained to a certain extent, that is, the discreteness or concentration of the brightness distribution of the image to be processed can be retained to a certain extent.

[0093] The following formula (7) is used as an example:

[0094]

[0095] Among them, L in With L out are the brightness channel values ​​before and after adjustment, and their value range is 0 to 100. in Divide by 100 for normalization, adjust the power function relationship, and then restore the original value range by multiplying by 100. in With μ ref In formula (7), respectively represent the average values ​​of the brightness channels in the image to be processed and the reference image. a represents a coefficient, and its value can be the first compensation value or the second compensation value. For example, when μ ref <μ in When a takes the first compensation value greater than 1, such as 2; when μ ref >μ in When a takes a second compensation value less than 1, such as 0.5.

[0096] By adjusting the value of the brightness channel using formula (7), while performing overall brightness migration to the reference image, the brightness distribution characteristics in the image to be processed can be better preserved to present a richer color scale, further improving the effect of image color migration.

[0097] The present disclosure does not limit the exponents in the power function relationship. For example, the exponent part of the brightness adjustment parameter in formula (7) is Can also be replaced by (b is another coefficient different from a), Other forms such as , can all produce adjustment effects similar to formula (7).

[0098] In one implementation, when the third brightness statistical value is equal to the fourth brightness statistical value, it indicates that the brightness of the image to be processed is very similar to that of the reference image, and the value of the brightness channel of the image to be processed does not need to be adjusted.

[0099] Figure 6 A schematic flow chart of the image color migration method is shown. Figure 6 As shown, the method flow includes:

[0100] S610, inputting an image to be processed and a reference image;

[0101] S620, converting the image to be processed and the reference image from the RGB color mode to the Lab color mode;

[0102] S630, calculating the L channel average value of the image to be processed and the L channel average value of the reference image, and determining whether the difference between the two L channel average values ​​is less than a preset brightness threshold, if so, executing step S640, if not, executing step S650;

[0103] S640, performs a uniform linear color migration on the values ​​of the three Lab image channels, and outputs the image after the color migration;

[0104] S650, performing a uniform linear color migration on the values ​​of the two image channels ab, and then proceeding to step S660;

[0105] S660, adjusting the value of the L channel separately, and outputting the image after color migration.

[0106] The exemplary embodiment of the present disclosure also provides another image color migration method. Figure 7 As shown, the method may include the following steps S710 to S740:

[0107] Step S710, obtaining an image to be processed and a reference image.

[0108] The acquisition of the image to be processed and the reference image may refer to step S110, which will not be described in detail here.

[0109] Step S720, determining a first type of image channel and a second type of image channel in each image channel according to the values ​​of each image channel of the image to be processed and the reference image.

[0110] In this exemplary embodiment, the image channels are classified according to the numerical difference between the image to be processed and the reference image in each image channel. Generally, the numerical difference is divided into two categories, and correspondingly, the image channels whose numerical difference belongs to the first category are the first category image channels, and the image channels whose numerical difference belongs to the second category are the second category image channels.

[0111] In one embodiment, the difference in the values ​​of each image channel between the image to be processed and the reference image may be measured to classify the value difference conditions. Specifically, step S720 may include:

[0112] Obtaining a first statistical value of the image channel obtained by counting the values ​​of different pixels in the processed image in any image channel, and a second statistical value of the image channel obtained by counting the values ​​of different pixels in the reference image in the image channel;

[0113] When the difference between the first statistical value and the second statistical value of the image channel is less than a preset threshold corresponding to the image channel, the image channel is determined as a first type of image channel;

[0114] When the difference between the first statistical value and the second statistical value of the image channel is greater than a preset threshold corresponding to the image channel, the image channel is determined to be a second type of image channel.

[0115] The first statistical value and the second statistical value may be the same statistical index, such as mean, median, mode, variance, standard deviation, etc. For each image channel, statistics may be performed in the image to be processed and the reference image to obtain the first statistical value and the second statistical value of the image channel. The difference between the first statistical value and the second statistical value is then compared with a preset threshold value corresponding to the image channel to classify the image channel.

[0116] The preset threshold corresponding to each image channel is a standard for measuring whether the value change of the image channel from the image to be processed to the reference image is too large, and can be determined based on experience and image scenes. The preset thresholds corresponding to different image channels can be the same or different.

[0117] When the difference between the first statistic and the second statistic of an image channel is less than the preset threshold corresponding to the image channel, it indicates that the value of the image channel has not changed much, and the image channel is determined as a first-category image channel. When the difference between the first statistic and the second statistic of an image channel is greater than the preset threshold corresponding to the image channel, it indicates that the value of the image channel has changed too much, and the image channel is determined as a second-category image channel.

[0118] In one embodiment, when the difference between the first statistical value and the second statistical value of an image channel is equal to a preset threshold corresponding to the image channel, the image channel can be determined as a first-category image channel, or the image channel can be determined as a second-category image channel, and the present disclosure does not limit this.

[0119] It should be noted that the above-mentioned image channels can be image channels in any color mode, that is, the present exemplary embodiment does not limit the color mode of the image to be processed and the reference image. For example, if the image to be processed and the reference image are both in RGB color mode, the difference between the first statistical value and the second statistical value of the R and G channels is less than the preset threshold value corresponding to each channel, and the difference between the first statistical value and the second statistical value of the B channel is greater than the preset threshold value corresponding to the B channel, then the R and G channels are the first type of image channels, and the B channel is the second type of image channel.

[0120] Step S730: uniformly adjust the values ​​of all first-category image channels of the image to be processed toward the reference image.

[0121] The unified numerical adjustment of all first-category image channels refers to the use of the same method or parameters for adjustment without making any special distinction for any first-category image channel.

[0122] In one implementation, step S730 may include:

[0123] Determine the m-element covariance matrix between the first-category image channels for the processed image and the reference image, respectively, where m is the number of the first-category image channels;

[0124] Determining a unified transformation parameter between the image to be processed and the reference image based on an m-element covariance matrix of the image to be processed and an m-element covariance matrix of the reference image;

[0125] The values ​​of all first-category image channels of the image to be processed are adjusted using a unified conversion parameter and a reference image.

[0126] For example, the total number of image channels of the image to be processed or the reference image is generally 3, of which two image channels are first-class image channels, that is, m=2, and the binary covariance matrix of the image to be processed and the binary covariance matrix of the reference image are obtained respectively. Then, referring to the contents of the above formulas (2) to (5), the unified conversion parameters between the image to be processed and the reference image can be obtained (refer to the above first conversion parameter T1 or the second conversion parameter T2), thereby achieving unified numerical adjustment.

[0127] It should be understood that the unified conversion parameters here are for all first-category image channels, and are irrelevant to the division of brightness channels / non-brightness channels. When the brightness channel belongs to the first-category image channel, the value of the brightness channel can also be adjusted by the unified conversion parameters.

[0128] Step S740: Perform separate numerical adjustments on each second-category image channel of the image to be processed relative to the reference image.

[0129] The separate numerical adjustment for each second-category image channel refers to using different methods or parameters to adjust different second-category image channels.

[0130] In one implementation, step S740 may include:

[0131] Determine an adjustment parameter of each second-category image channel based on a ratio of values ​​of the reference image and the image to be processed in each second-category image channel;

[0132] The adjustment parameters of each second-type image channel are used to adjust the value of each second-type image channel of the image to be processed.

[0133] The adjustment parameters are for each second-type image channel, that is, the adjustment parameters of different second-type image channels are generally different.

[0134] The determination of the adjustment parameters of each second-class image channel and the specific adjustment method can refer to the above Figure 5 The content of this part is similar to the determination of brightness adjustment parameters and the numerical adjustment method of the brightness channel.

[0135] For example, the image to be processed and the reference image are both in RGB color mode, the R and G channels are the first type of image channels, and the B channel is the second type of image channel. The average value of the B channel of different pixels of the image to be processed is counted and recorded as μ in , the average value of the B channel of different pixels of the reference image is also counted, denoted as μ ref The B channel value of the image to be processed is adjusted using the following power function relationship:

[0136]

[0137] Among them, B in With B out are the B channel values ​​before and after adjustment, and their value range is 0 to 255. in Divide by 255 for normalization, adjust the power function relationship, and then restore the original value range by multiplying by 255. a represents the coefficient, which can refer to the first compensation value or the second compensation value mentioned above. ref <μ in With μ ref >μ in In the two cases, different values ​​are set for a, such as 2 and 0.5 respectively.

[0138] based on Figure 7 The method shown in the figure divides the image channels into the first type of image channels and the second type of image channels according to the numerical difference between each image channel of the image to be processed and the reference image, and respectively adopts unified color migration and separate color migration for processing. This improves the pertinence of color migration in different image channels, and while achieving sufficient color migration, retains the numerical distribution characteristics of different channels in the image to be processed to a certain extent, so as to present a richer color scale and improve the effect of image color migration.

[0139] The exemplary embodiment of the present disclosure also provides an image color migration device. Figure 8 As shown, the image color migration device 800 may include:

[0140] The image acquisition module 810 is configured to acquire an image to be processed and a reference image;

[0141] The first color migration module 820 is configured to use a first migration strategy to perform color migration from the image to be processed to the reference image when it is determined that the preset brightness condition is satisfied according to the brightness value of the image to be processed and the brightness value of the reference image;

[0142] The second color migration module 830 is configured to use a second migration strategy to perform color migration from the image to be processed to the reference image when it is determined that the preset brightness condition is not satisfied according to the brightness value of the image to be processed and the brightness value of the reference image.

[0143] In one embodiment, judging that the preset brightness condition is satisfied based on the brightness channel value of the image to be processed and the brightness channel value of the reference image includes:

[0144] Acquire a first brightness statistical value obtained by counting the brightness values ​​of different pixels in the image to be processed, and a second brightness statistical value obtained by counting the brightness values ​​of different pixels in the reference image;

[0145] It is determined that the difference between the first brightness statistical value and the second brightness statistical value is less than a preset brightness threshold.

[0146] In one implementation, the first color migration module 820 is configured to:

[0147] Determine the ternary covariance matrix between the three image channels for the processed image and the reference image respectively;

[0148] Determining a first conversion parameter between the image to be processed and the reference image based on a ternary covariance matrix of the image to be processed and a ternary covariance matrix of the reference image;

[0149] The values ​​of three image channels of the image to be processed are adjusted using the first conversion parameter and the reference image.

[0150] In one embodiment, the second color migration module 830 includes a non-brightness channel adjustment unit configured to:

[0151] Determine the binary covariance matrix between two non-brightness channels of the processed image and the reference image respectively;

[0152] Determining a second conversion parameter between the image to be processed and the reference image based on the binary covariance matrix of the image to be processed and the binary covariance matrix of the reference image;

[0153] The values ​​of two non-brightness channels of the image to be processed are adjusted respectively using the second conversion parameter and the reference image.

[0154] In one implementation, the second color migration module 830 further includes a brightness channel adjustment unit configured to:

[0155] Determining a brightness adjustment parameter based on a ratio of a brightness value of a reference image to a brightness value of an image to be processed;

[0156] The brightness adjustment parameter is used to adjust the value of the brightness channel of the image to be processed.

[0157] In one implementation, the brightness channel adjustment unit is configured as follows:

[0158] Acquire a third brightness statistical value obtained by counting the brightness values ​​of different pixels in the image to be processed, and a fourth brightness statistical value obtained by counting the brightness values ​​of different pixels in the reference image;

[0159] When the third brightness statistical value is greater than the fourth brightness statistical value, determining the brightness adjustment parameter according to a ratio of the fourth brightness statistical value to the third brightness statistical value and a first compensation value;

[0160] When the third brightness statistical value is less than the fourth brightness statistical value, the brightness adjustment parameter is determined according to a ratio of the fourth brightness statistical value to the third brightness statistical value and a second compensation value.

[0161] In one implementation, the brightness channel adjustment unit is configured as follows:

[0162] The brightness adjustment parameter is used as an exponent to adjust the value of the brightness channel of the image to be processed through a power function relationship.

[0163] The exemplary embodiment of the present disclosure also provides an image color migration device. Fig. 9 As shown, the image color migration device 900 may include:

[0164] The image acquisition module 910 is configured to acquire an image to be processed and a reference image;

[0165] The image channel classification module 920 is configured to determine the first type of image channels and the second type of image channels in each image channel according to the values ​​of each image channel of the image to be processed and the reference image;

[0166] A first color migration module 930 is configured to uniformly adjust the values ​​of all first-category image channels of the image to be processed toward the reference image;

[0167] The second color migration module 940 is configured to perform separate numerical adjustments on each second type of image channel of the image to be processed toward the reference image.

[0168] In one embodiment, the image channel classification module 920 is configured to:

[0169] Obtaining a first statistical value of any image channel obtained by counting the values ​​of different pixels in the processed image in any image channel, and a second statistical value of any image channel obtained by counting the values ​​of different pixels in the reference image in any image channel;

[0170] When the difference between the first statistical value and the second statistical value of any image channel is less than a preset threshold corresponding to any image channel, any image channel is determined as a first-category image channel;

[0171] When the difference between the first statistical value and the second statistical value of any image channel is greater than a preset threshold corresponding to any image channel, any image channel is determined as a second type of image channel.

[0172] In one implementation, the first color migration module 930 is configured to:

[0173] Determine the m-element covariance matrix between the first-category image channels for the processed image and the reference image, respectively, where m is the number of the first-category image channels;

[0174] Determining a unified transformation parameter between the image to be processed and the reference image based on an m-element covariance matrix of the image to be processed and an m-element covariance matrix of the reference image;

[0175] The values ​​of all first-category image channels of the image to be processed are adjusted using a unified conversion parameter and a reference image.

[0176] In one implementation, the second color migration module 940 is configured to:

[0177] Determine an adjustment parameter of each second-category image channel based on a ratio of values ​​of the reference image and the image to be processed in each second-category image channel;

[0178] The adjustment parameters of each second-type image channel are used to adjust the value of each second-type image channel of the image to be processed.

[0179] The details of each part of the above-mentioned device 800 and device 900 have been described in detail in the implementation method part, and thus will not be repeated here.

[0180] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium, which can be implemented in the form of a program product, which includes a program code, and when the program product is run on an electronic device, the program code is used to cause the electronic device to perform the steps described in the above "Exemplary Method" section of this specification according to various exemplary embodiments of the present disclosure. In one embodiment, the program product can be implemented as a portable compact disk read-only memory (CD-ROM) and includes program code, and can be run on an electronic device, such as a personal computer. However, the program product of the present disclosure is not limited to this, and in this document, the readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, device or device.

[0181] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0182] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0183] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0184] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0185] The exemplary embodiment of the present disclosure also provides an electronic device, which may be a terminal device or a server for performing image color migration processing. Fig.10 The electronic device is described. It should be understood that Fig.10 The electronic device 1000 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0186] like Fig.10 As shown, the electronic device 1000 is in the form of a general computing device. The components of the electronic device 1000 may include but are not limited to: at least one processing unit 1010, at least one storage unit 1020, and a bus 1030 connecting different system components (including the storage unit 1020 and the processing unit 1010).

[0187] The storage unit stores program codes, which can be executed by the processing unit 1010, so that the processing unit 1010 performs the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit 1010 can perform the following steps: Figure 1 The method steps shown, etc.

[0188] The storage unit 1020 may include a volatile storage unit, such as a random access storage unit (RAM) 1021 and / or a cache storage unit 1022 , and may further include a read-only storage unit (ROM) 1023 .

[0189] The storage unit 1020 may also include a program / utility 1024 having a set (at least one) of program modules 1025, such program modules 1025 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0190] The bus 1030 may include a data bus, an address bus, and a control bus.

[0191] The electronic device 1000 may also communicate with one or more external devices 1100 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), and such communication may be performed via an input / output (I / O) interface 1040. The electronic device 1000 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 1050. As shown, the network adapter 1050 communicates with other modules of the electronic device 1000 via a bus 1030. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0192] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0193] It will be appreciated by those skilled in the art that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or implementations combining hardware and software aspects, which may be collectively referred to herein as "circuit", "module" or "system". Those skilled in the art will readily think of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses or adaptive changes of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and implementation are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0194] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. An image color migration method, characterized in that: include: Obtaining an image to be processed and a reference image; If the color mode of the image to be processed does not include a brightness channel, converting the color mode of the image to be processed into a color mode including a brightness channel; If the color mode of the reference image does not include a brightness channel, converting the color mode of the reference image into a color mode including a brightness channel; When it is determined that the preset brightness condition is satisfied according to the brightness value of the image to be processed and the brightness value of the reference image, a first migration strategy is adopted to perform color migration of the image to be processed toward the reference image; The first migration strategy refers to uniformly adjusting the values ​​of each image channel in the image to be processed toward the reference image; When it is determined according to the brightness value of the image to be processed and the brightness value of the reference image that the preset brightness condition is not satisfied, a second migration strategy is adopted to perform color migration of the image to be processed toward the reference image; The second migration strategy is to make a uniform numerical adjustment to the non-brightness channel in the image to be processed toward the reference image, and to make a separate numerical adjustment to the brightness channel toward the reference image.

2. The method according to claim 1, characterized in that: The step of judging whether a preset brightness condition is satisfied according to the brightness value of the image to be processed and the brightness value of the reference image includes: Acquire a first brightness statistical value obtained by counting the brightness values ​​of different pixels in the image to be processed, and a second brightness statistical value obtained by counting the brightness values ​​of different pixels in the reference image; It is determined that a difference between the first brightness statistical value and the second brightness statistical value is less than a preset brightness threshold.

3. The method according to claim 1, characterized in that The adopting a first migration strategy to perform color migration from the image to be processed to the reference image includes: Determining a ternary covariance matrix between three image channels for the image to be processed and the reference image respectively; the image to be processed and the reference image adopt a color mode with three image channels, and the three image channels are all image channels under the color mode; Determining a first conversion parameter between the image to be processed and the reference image based on a ternary covariance matrix of the image to be processed and a ternary covariance matrix of the reference image; The values ​​of the three image channels of the image to be processed are adjusted using the first conversion parameter and the reference image.

4. The method according to claim 1, characterized in that The adopting the second migration strategy to perform color migration from the image to be processed to the reference image includes: Determining a binary covariance matrix between two non-brightness channels for the image to be processed and the reference image, respectively; the image to be processed and the reference image adopt a color mode with three image channels, one of which is a brightness channel and two of which are non-brightness channels; Determining a second conversion parameter between the image to be processed and the reference image based on a binary covariance matrix of the image to be processed and a binary covariance matrix of the reference image; The values ​​of two non-brightness channels of the image to be processed are adjusted respectively using the second conversion parameter and the reference image.

5. The method according to claim 4, characterized in that The adopting the second migration strategy to perform color migration of the image to be processed to the reference image also includes: Determining a brightness adjustment parameter based on a ratio of a brightness value of the reference image to a brightness value of the image to be processed; The brightness adjustment parameter is used to adjust the value of the brightness channel of the image to be processed.

6. The method according to claim 5, characterized in that The determining of the brightness adjustment parameter based on the ratio of the brightness channel value of the reference image to the brightness channel value of the image to be processed comprises: Acquire a third brightness statistical value obtained by counting the brightness values ​​of different pixels in the image to be processed, and a fourth brightness statistical value obtained by counting the brightness values ​​of different pixels in the reference image; When the third brightness statistical value is greater than the fourth brightness statistical value, determining the brightness adjustment parameter according to a ratio of the fourth brightness statistical value to the third brightness statistical value and a first compensation value; When the third brightness statistical value is less than the fourth brightness statistical value, the brightness adjustment parameter is determined according to a ratio of the fourth brightness statistical value to the third brightness statistical value and a second compensation value.

7. The method according to claim 5, characterized in that The step of adjusting the value of the brightness channel of the image to be processed by using the brightness adjustment parameter includes: The brightness adjustment parameter is used as an exponent and the value of the brightness channel of the image to be processed is adjusted through a power function relationship.

8. An image color migration method, characterized in that: include: Obtaining an image to be processed and a reference image; According to the values ​​of each image channel of the image to be processed and the reference image, determining a first type of image channel and a second type of image channel in each image channel; Performing uniform numerical adjustments on all first-category image channels of the image to be processed toward the reference image; Performing a separate numerical adjustment on each second-category image channel of the image to be processed toward the reference image; Wherein, determining the first type of image channels and the second type of image channels in each image channel according to the values ​​of each image channel of the image to be processed and the reference image comprises: Obtaining a first statistical value of any image channel obtained by counting the values ​​of different pixels in the image to be processed in any image channel, and a second statistical value of any image channel obtained by counting the values ​​of different pixels in the reference image in any image channel; When the difference between the first statistical value and the second statistical value of any image channel is less than a preset threshold corresponding to any image channel, determining any image channel as a first type of image channel; When the difference between the first statistical value and the second statistical value of any image channel is greater than a preset threshold corresponding to any image channel, the any image channel is determined as a second type of image channel.

9. The method according to claim 8, characterized in that The step of uniformly adjusting the values ​​of all first-category image channels of the image to be processed toward the reference image comprises: Determine an m-element covariance matrix between first-category image channels for the image to be processed and the reference image, respectively, where m is the number of first-category image channels; Determining a unified conversion parameter between the image to be processed and the reference image based on the m-element covariance matrix of the image to be processed and the m-element covariance matrix of the reference image; The values ​​of all first-category image channels of the image to be processed are adjusted using the unified conversion parameter and the reference image.

10. The method according to claim 8, characterized in that The step of separately adjusting the numerical value of each second-type image channel of the image to be processed to the reference image comprises: Determine an adjustment parameter of each second-category image channel based on a ratio of values ​​of the reference image and the image to be processed in each second-category image channel; The value of each second-category image channel of the image to be processed is adjusted using the adjustment parameters of each second-category image channel respectively.

11. An image color migration device, characterized in that: include: An image acquisition module is configured to acquire an image to be processed and a reference image; If the color mode of the image to be processed does not include a brightness channel, converting the color mode of the image to be processed into a color mode including a brightness channel; If the color mode of the reference image does not include a brightness channel, converting the color mode of the reference image into a color mode including a brightness channel; A first color migration module is configured to use a first migration strategy to perform color migration from the image to be processed to the reference image when it is determined that a preset brightness condition is satisfied according to the brightness value of the image to be processed and the brightness value of the reference image; The first migration strategy refers to uniformly adjusting the values ​​of each image channel in the image to be processed toward the reference image; A second color migration module is configured to adopt a second migration strategy to perform color migration of the image to be processed toward the reference image when it is determined that the preset brightness condition is not satisfied according to the brightness value of the image to be processed and the brightness value of the reference image; The second migration strategy is to make a uniform numerical adjustment to the non-brightness channel in the image to be processed toward the reference image, and to make a separate numerical adjustment to the brightness channel toward the reference image.

12. An image color migration device, characterized in that: include: An image acquisition module is configured to acquire an image to be processed and a reference image; An image channel classification module is configured to determine a first category of image channels and a second category of image channels in each image channel according to values ​​of each image channel of the image to be processed and the reference image; A first color migration module is configured to uniformly adjust the values ​​of all first-category image channels of the image to be processed toward the reference image; A second color migration module is configured to perform a separate numerical adjustment on each second type of image channel of the image to be processed toward the reference image; Wherein, determining the first type of image channels and the second type of image channels in each image channel according to the values ​​of each image channel of the image to be processed and the reference image comprises: Obtaining a first statistical value of any image channel obtained by counting the values ​​of different pixels in the image to be processed in any image channel, and a second statistical value of any image channel obtained by counting the values ​​of different pixels in the reference image in any image channel; When the difference between the first statistical value and the second statistical value of any image channel is less than a preset threshold corresponding to any image channel, determining any image channel as a first type of image channel; When the difference between the first statistical value and the second statistical value of any image channel is greater than a preset threshold corresponding to any image channel, the any image channel is determined as a second type of image channel.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

14. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 10 by executing the executable instructions.