WO2021052028A1 - 图像颜色迁移方法、装置、计算机设备和存储介质 - Google Patents

图像颜色迁移方法、装置、计算机设备和存储介质 Download PDF

Info

Publication number
WO2021052028A1
WO2021052028A1 PCT/CN2020/105933 CN2020105933W WO2021052028A1 WO 2021052028 A1 WO2021052028 A1 WO 2021052028A1 CN 2020105933 W CN2020105933 W CN 2020105933W WO 2021052028 A1 WO2021052028 A1 WO 2021052028A1
Authority
WO
WIPO (PCT)
Prior art keywords
color
image
converted
vector
migration
Prior art date
Application number
PCT/CN2020/105933
Other languages
English (en)
French (fr)
Inventor
冯超唯
王孝阳
Original Assignee
苏宁云计算有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏宁云计算有限公司 filed Critical 苏宁云计算有限公司
Priority to CA3154893A priority Critical patent/CA3154893C/en
Publication of WO2021052028A1 publication Critical patent/WO2021052028A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Definitions

  • This application relates to the field of image processing technology, and in particular to an image color migration method, device, computer equipment and storage medium.
  • Color migration technology can convert image colors into other colors.
  • the directional color migration method is the main method to realize the color migration function, and this method requires a reference image, which cannot be adapted to many application scenarios. For example, most graphic design application scenarios are: only a hexadecimal color code of a target color is given, and then the image after color migration needs to be as close to this color as possible in terms of visual effects. Therefore, the directional color migration method cannot be used to achieve the color migration of the image.
  • An image color migration method includes:
  • the migration vector used when the target color is migrated to the image to be converted According to the color value of the main color of the image to be converted and the color value of the target color, determine the migration vector used when the target color is migrated to the image to be converted;
  • the target color is migrated to the image to be converted.
  • the migration vector used when the target color is migrated to the image to be converted is determined, including:
  • the migration vector is determined according to the first three-dimensional color vector and the second three-dimensional color vector.
  • determining the migration vector according to the first three-dimensional color vector and the second three-dimensional color vector includes:
  • transferring the target color to the image to be converted according to the transfer vector includes:
  • the color value of the pixel of the image to be converted is migrated, and the image to be converted after the migration is used as the target image;
  • the target image is the image after the target color is transferred to the image to be converted.
  • the migration of the color value of the pixel of the image to be converted according to the migration vector includes:
  • the color values of the pixels of the image to be converted are respectively migrated according to the brightness dimension, the saturation dimension and the hue dimension in the target color space.
  • the color values of the pixels of the image to be converted are respectively migrated according to the brightness dimension, the saturation dimension and the hue dimension, including:
  • the first normalization function normalize the brightness data corresponding to the brightness dimension among the color values of the pixels of the image to be converted to obtain the first value
  • the color value of the pixel of the image to be converted is migrated according to the brightness dimension
  • the saturation data normalize the saturation data corresponding to the saturation dimension in the color values of the pixels of the image to be converted to obtain the second value
  • the color value of the pixel of the image to be converted is migrated according to the saturation dimension
  • Obtain the sum of the migration vector and the color value of the pixel of the image to be converted take the remainder of the sum of 2 ⁇ , and migrate the color value of the pixel of the image to be converted according to the hue dimension according to the result of the remainder ; ⁇ is the circumference of the circle.
  • the image color migration method further includes:
  • the color with the highest occurrence probability among the multiple colors is used as the main color of the image to be converted.
  • An image color migration device which includes:
  • the extraction module is used to extract the color value of the main color of the image to be converted
  • the determining module is used to determine the migration vector used when the target color is migrated to the image to be converted according to the color value of the main color of the image to be converted and the color value of the target color;
  • the migration module is used to migrate the target color to the image to be converted according to the migration vector.
  • a computer device includes a memory, a processor, and a computer program that is stored on the memory and can run on the processor.
  • the processor implements the steps of any of the above-mentioned embodiments when the computer program is executed.
  • the above-mentioned image color migration method, device, computer equipment and storage medium when the color value of the target color migrated to the image to be converted is determined, the color value of the main color of the image to be converted is extracted, and the color value of the main color of the image to be converted is extracted.
  • the color value and the color value of the target color determine the migration vector for color migration, and finally the target color can be migrated to the image to be converted according to the migration vector. Therefore, the color migration of the image to be converted can be realized without the target reference image, which breaks the limitation of the traditional color migration technology that requires reference pictures, so that the color migration technology can meet more application scenarios.
  • FIG. 1 is an application environment diagram of an image color migration method in an embodiment
  • FIG. 2 is a schematic flowchart of an image color migration method in an embodiment
  • Figure 3 is a schematic flow chart of step S200 in an embodiment
  • FIG. 4 is an interface image display diagram of an image color migration method in an embodiment when two different normalization functions are used for color migration;
  • FIG. 5 is an interface image display diagram of an image color migration method according to another embodiment
  • FIG. 6 is a structural block diagram of an image color migration device in an embodiment
  • Fig. 7 is an internal structure diagram of a computer device in an embodiment.
  • This application provides an image color migration method, which can be applied to the application environment as shown in FIG. 1.
  • the server 10 and the storage device 20 communicate through a network. Multiple images are stored in the storage device 20. Each image is set with colors and images, as well as corresponding text and numbers.
  • the server 10 is used to read an image from the storage device 20 and perform color migration processing on the image to obtain an image that meets the requirements. Specifically, the server 10 stores color values of multiple colors.
  • the server 10 reads the image to be converted from the storage device 20 and determines the color value of the corresponding target color from the internal storage through the received color migration instruction.
  • the target color is migrated to the image to be converted according to the color value of the target color, so that the target image that satisfies the color migration instruction is realized.
  • the server 10 communicates with the terminal device group 40 through the network.
  • the server 10 communicates with the terminal device group 40 through the cloud network 30, and delivers the target image obtained after the color migration to each terminal of the terminal device group 40.
  • Each terminal of the terminal device group 40 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, desktop computers, etc.
  • the server 10 can be implemented by an independent server or a server cluster composed of multiple servers.
  • an image color migration method is provided, and the method is applied to the server in FIG. 1 as an example for description, including the following steps:
  • multiple images used for color migration are stored in the background storage device.
  • the server obtains the image to be converted from the background storage device according to the received color migration instruction.
  • the image format of the image to be converted is JPG, JPEG, TIFF, PNG, RAW or BMP, etc.
  • the server also determines the target color for migration to the image to be converted according to the received color migration instruction.
  • the target color may be stored in the server or in the background storage device in the form of color values, and may also be stored in the server or in the background storage device in the form of color images.
  • the server obtains the main color of the image to be converted, and then extracts the color value of the main color.
  • the color value of the main color can be a hexadecimal color code, or any form such as RGB value and HSV value.
  • the image color migration method further includes: sampling the image to be converted using a color quantization algorithm to obtain multiple quantized colors; and using the color with the highest probability of occurrence among the multiple colors as the main color of the image to be converted .
  • the server uses the OpenCV (Open Source Computer Vision Library) library to read the image to be converted, and uses the color quantization algorithm to sample the image to be converted, and each sample obtains a color, thereby obtaining the quantized image.
  • the color quantization algorithm includes median segmentation method, K-means clustering method, octree method, frequency sequence method, and so on.
  • MMCQ Modified Median Cut Quantization
  • MMCQ Modified Median Cut Quantization
  • S200 Determine a migration vector used when migrating the target color to the image to be converted according to the color value of the main color of the image to be converted and the color value of the target color.
  • the server reads the color value of the target color. Further, according to the color value of the main color of the image to be converted and the color value of the target color, the migration vector when performing the color migration of the image is determined.
  • the migration vector is a motion vector referred to when the target color is migrated to the image to be converted.
  • the color value of the main color of the image to be converted and the color value of the target color are the corresponding color values in the same color space, thereby ensuring the feasibility of obtaining the migration vector
  • step S200 includes:
  • S210 Acquire a first three-dimensional color vector corresponding to the color value of the main color of the image to be converted in the target color space.
  • S230 Obtain a second three-dimensional color vector corresponding to the color value of the target color in the target color space.
  • S250 Determine a migration vector according to the first three-dimensional color vector and the second three-dimensional color vector.
  • the server places the color value of the main color of the image to be converted and the color value of the target color in the same color space, and then performs calculation to obtain the migration vector. Specifically, the server determines the target color space.
  • the target color space is a three-dimensional color space, and the three dimensions are used to represent the brightness channel, saturation channel, and hue channel in the color.
  • the target color space used in this embodiment is the CIE-LCH color model space. Of course, other color spaces can also be used for numerical conversion calculations.
  • the server obtains the first three-dimensional color vector corresponding to the color value of the main color of the image to be converted in the target color space and the second three-dimensional color vector corresponding to the color value of the target color in the target color space, according to the first three-dimensional color vector in the target color space.
  • the three-dimensional color vector and the second three-dimensional color vector determine the migration vector.
  • the migration vector here is also the corresponding three-dimensional vector in the target color space.
  • the main color of the image to be converted and the target color for color migration are converted to the CIE-LCH color model space.
  • the conversion method can use a third-party library of python, and use the corresponding function in the scikit-image image processing package for image processing.
  • the color value of the main color of the image to be converted and the color value of the target color are processed to determine the migration vector, which uses the CIE-LCH color model space to have a range of responses to the same transformation. Uniform properties, so it can ensure the controllability of color migration.
  • step S250 includes: obtaining a translation transformation vector used when the first three-dimensional color vector is translated to the second three-dimensional color, and using the translation transformation vector as the migration vector.
  • the first three-dimensional color vector Translate to the second three-dimensional color vector obtain the translation transformation vector used in the translation process, and use the translation transformation vector as the migration vector.
  • the translation transformation vector is dist lch
  • the calculation method of the translation transformation vector is as follows:
  • lch target represents the second three-dimensional color vector
  • lch theme represents the first three-dimensional color vector
  • dist lch is the translation transformation vector.
  • Each dimension represents the distance moved by the corresponding coordinate axis in the CIE-LCH color model space of the corresponding dimension.
  • the modulus of dist lch is the Euclidean distance between the second three-dimensional color vector and the first three-dimensional color vector in the CIE-LCH color space.
  • the translation transformation vector used when the first three-dimensional color vector is translated to the second three-dimensional color is used as the migration vector.
  • the migration vector is subsequently used to migrate the target color to the image to be converted, the color contrast between the different color regions is basically maintained Relationship, will not destroy the color matching rules of the image to be converted, and the image generated after the migration is more beautiful.
  • the server migrates the target color to the image to be converted according to the migration vector, so as to realize the image color migration.
  • the color that appears is the color after the target color is transferred to the image to be converted. Color effect.
  • the color value of the part of the image to be converted is moved according to the migration vector, and the color that appears in the image obtained after the movement is the color effect after the target color is transferred to the image to be converted. Therefore, the limitation of the traditional color migration technology that requires reference pictures is overcome.
  • the migration vector is a three-dimensional vector determined according to the first three-dimensional color vector corresponding to the color value of the main color of the image to be converted in the target color space and the second three-dimensional color vector corresponding to the color value of the target color.
  • step S300 includes: extracting the color value of the pixel of the image to be converted, and transferring the color value of the pixel of the image to be converted according to the migration vector, and using the image to be converted after the migration as the target image, and the target image is the target image. The color is transferred to the image after the image to be converted.
  • the color value of the pixel of the image to be converted is extracted, and the color value of the pixel is migrated according to the migration vector.
  • the displayed color is the target color in the image to be converted.
  • the color in the display results, so the target color is transferred to the image to be converted.
  • the color values of all pixels of the image to be converted may be migrated according to the migration vector, and the image to be converted after the migration is used as the target image. It may also be that the color values of some pixels of the image to be converted are migrated according to the migration vector, and the image to be converted after the migration is used as the target image.
  • the color value of the pixel of the image to be converted is migrated, including: according to the migration vector, the color value of the pixel of the image to be converted is migrated according to the brightness dimension, the saturation dimension, and the hue dimension, respectively. ; Among them, the target color space includes brightness, saturation, and hue dimensions.
  • the target color space is a three-dimensional space, and the corresponding three dimensions in the three-dimensional space are divided into individual brightness dimensions, saturation dimensions, and hue dimensions. That is, the color value of the pixel of the image to be converted is embodied in the target color space as numerical values represented by three dimensional values, and the three dimensional values respectively represent the brightness, saturation, and hue of the pixel.
  • the migration vector is a three-dimensional vector, and the three dimensions represent the brightness, saturation, and hue corresponding to the color.
  • the color values of the pixels of the image to be converted are migrated according to the migration vector, and the image after the migration is the image in which the target color is migrated to the image to be converted.
  • the color migration process may be to migrate the color values of all pixels of the image to be converted according to the migration vector, or to migrate the color values of some pixels of the image to be converted according to the migration vector.
  • the color values of the pixels of the image to be converted are respectively migrated according to the brightness dimension, the saturation dimension and the hue dimension, including: according to the first normalization function, the color value of the pixel to be converted is transferred
  • the brightness data corresponding to the brightness dimension in the color values of the pixels of the image is normalized to obtain the first value; according to the migration vector and the first value, the color values of the pixels of the image to be converted are migrated according to the brightness dimension; according to the second The normalization function normalizes the saturation data corresponding to the saturation dimension in the color values of the pixels of the image to be converted to obtain the second value; according to the migration vector and the second value, the color of the pixel of the image to be converted
  • the value is migrated according to the saturation dimension; the sum of the migration vector and the color value of the pixel of the image to be converted is obtained, and the sum value is taken as 2 ⁇ , and the color value of the pixel of the image to be converted is migrated according to the hue dimension according to the result
  • the color values of all pixels of the image to be converted are migrated according to the migration vector.
  • the following methods are used:
  • i and j are the two-dimensional coordinates in the image
  • L represents the brightness dimension
  • C represents the saturation dimension
  • H represents the hue dimension
  • p i,j [L] represents the value of the image to be converted in the brightness dimension
  • p i,j [C] represents the value of the image to be converted in the saturation dimension
  • p i,j [H] represents the hue of the image to be converted
  • f l (pi ,j [L]) represents the first normalization function
  • f c (pi ,j [C]) represents the second normalization function
  • MOD represents the remainder operation.
  • dist lch [L] represents the value of the migration vector in the brightness dimension
  • dist lch [C] represents the value of the migration vector in the saturation dimension
  • dist lch [H] represents the value of the migration vector in the hue dimension
  • p i,j [L]′ represents the value obtained after the image to be converted is transferred in the brightness dimension
  • p i,j [C]′ represents the value obtained after the image to be converted is transferred in the saturation dimension
  • p i,j [H] ′ Represents the value obtained after the hue dimension of the image to be converted is shifted.
  • the first normalization function f l (pi ,j [L]) is:
  • the second normalization function f c (pi ,j [C]) is:
  • the domain of p i,j [L] and p i,j [C] is [0,100]
  • the domain of p i,j [H] is [0,2 ⁇ ].
  • the value range of f l (pi ,j [L]) and f c (pi ,j [C]) is [0,1]
  • the value range of p i,j [H]' is [0,2 ⁇ ].
  • first normalization function f l (pi ,j [L]) can also be:
  • the second normalization function f c (pi ,j [C]) can also be:
  • a normalization function is used to limit the image to be converted, so as to ensure as far as possible that the color value of the pixel after the conversion still falls within the defined domain.
  • the defined normalization function is continuous in the entire definition domain, which ensures that the image after color migration will not produce a sense of tearing in each edge area, which enhances the readability.
  • first normalization function and the second normalization function can be diverse, and the constraints that are obeyed in the physical sense are:
  • the maximum value is 1. This is because black and white areas are generally areas that do not want to participate in color transformation, such as black and white copywriting.
  • the translation vector is weighted by the normalization function to ensure that the black and white copy colors in the original image are basically unchanged.
  • the normalization function increases monotonically within the domain, and the value domain is [0,1]. This ensures that when the saturation of the primary color value is low, its saturation change range should also be low, so as to avoid inaccurate color values after the color conversion.
  • the first normalization function f l (pi ,j [L]) is:
  • the second normalization function f c (pi ,j [C]) is:
  • the first normalization function f l (pi ,j [L]) is:
  • the second normalization function f c (pi ,j [C]) is:
  • the result display is shown in Figure 4.
  • the color of the target color is shown in FIG. 11.
  • the new image obtained is image 22
  • the second set of functions are used to achieve color migration
  • the new image obtained is image 33. Comparing the image 22 and the image 33, it can be seen that after the target color is shifted, the display effect of the image and the copy in the image 22 is significantly different from the display effect of the image and the copy in the image 33.
  • the image generated by the first set of number functions has a decrease in the contrast of the copy
  • the image generated by the second set of functions has a clear contrast of the copy, but the color saturation and brightness have decreased.
  • the choice of the normalization function is subjective.
  • the two sets of normalization functions given in this application are the two groups that are considered to have better rendering effects through experiments. Under the premise of ensuring the basic effects of generating pictures, they focus on bright and Relatively stable scene. In fact, the functions subject to the above constraints can all be used as normalized functions, but they will also have different effects on the generated pictures.
  • the image color migration method further includes: converting the image obtained after the target color is migrated to the image to be converted into an image corresponding to the target format.
  • the target color and the image to be converted need to be converted into the target color space for processing, and the resulting image after the migration is also an image in the target color space. Therefore, it is necessary to convert the image obtained after the migration into an image of the target format corresponding to the demand, and finally output the image of the target format.
  • the image obtained after the target color is transferred to the image to be converted can be converted according to various requirements.
  • the image to be converted and the target color are both images and colors represented in the RGB color space. After converting both to the CIE-LCH color model space for color migration processing, the image obtained after migration is converted back to the RGB color space. Finally, the image in the RGB color space is output.
  • the color value of the target color migrated to the image to be converted is determined, the color value of the main color of the image to be converted is extracted, and the color value of the main color of the image to be converted and the color value of the target color are used ,
  • the migration vector for color migration is determined, and finally the target color can be migrated to the image to be converted according to the migration vector. Therefore, the color migration of the image to be converted can be realized without the target reference image, which breaks the limitation of the traditional color migration technology that requires reference pictures, so that the color migration technology can meet more application scenarios.
  • MMCQ Modified Median Cut Quantization
  • each pixel in the picture to be processed is transformed according to the translation transformation vector to obtain the transformed picture.
  • the result achieved is shown in FIG. 5.
  • the target color 44 is migrated to the picture 55 to be processed, and the target picture 66 is obtained after the final migration.
  • steps in the flowchart are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, there is no strict order for the execution of these steps, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution of these sub-steps or stages The sequence is not necessarily performed sequentially, but may be performed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
  • an image color migration device which includes: an extraction module 100, a determination module 200, and a migration module 300, wherein:
  • the extraction module 100 is used to extract the color value of the main color of the image to be converted.
  • the determining module 200 is configured to determine the migration vector used when the target color is migrated to the image to be converted according to the color value of the main color of the image to be converted and the color value of the target color.
  • the migration module 300 is used to migrate the target color to the image to be converted according to the migration vector.
  • the determining module 200 may include (not shown in FIG. 6):
  • the first acquiring unit is configured to acquire the first three-dimensional color vector corresponding to the color value of the main color of the image to be converted in the target color space.
  • the second acquiring unit is configured to acquire a second three-dimensional color vector corresponding to the color value of the target color in the target color space.
  • the determining unit is used to determine the migration vector according to the first three-dimensional color vector and the second three-dimensional color vector.
  • the determining unit may include:
  • the determining subunit is used to obtain the translation transformation vector used when the first three-dimensional color vector is translated to the second three-dimensional color, and the translation transformation vector is used as the migration vector.
  • the migration module 300 may include (not shown in FIG. 6):
  • the extraction unit is used to extract the color value of the pixel of the image to be converted.
  • the migration unit is configured to migrate the color values of the pixels of the image to be converted according to the migration vector, and use the image to be converted after the migration as the target image;
  • the target image is the image after the target color is transferred to the image to be converted.
  • the migration unit further includes:
  • the migration sub-unit is used to migrate the color values of the pixels of the image to be converted according to the migration vector according to the brightness dimension, the saturation dimension and the hue dimension in the target color space.
  • the migration subunit further includes (not shown in Figure 6):
  • the first processing unit is configured to perform normalization processing on the brightness data corresponding to the brightness dimension in the color values of the pixels of the image to be converted according to the first normalization function to obtain the first value; according to the migration vector and the first value, The color value of the pixel of the image to be converted is migrated according to the brightness dimension;
  • the second processing unit is configured to perform normalization processing on the saturation data corresponding to the saturation dimension in the color values of the pixels of the image to be converted according to the second normalization function to obtain the second value; according to the migration vector and the second Numerical value, which transfers the color value of the pixel of the image to be converted according to the saturation dimension;
  • the third processing unit is used to obtain the sum of the migration vector and the color value of the pixel of the image to be converted, take the remainder of the sum to 2 ⁇ , and transfer the color value of the pixel of the image to be converted according to the hue dimension according to the remainder result; ⁇ is the circumference of the circle.
  • the image color shifting device further includes (not shown in Figure 6):
  • the segmentation module uses a color quantization algorithm to perform sampling processing on the image to be converted to obtain multiple quantized colors; the color with the highest occurrence probability among the multiple colors is used as the main color of the image to be converted.
  • Each module in the above-mentioned image color migration device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a computer device may be an image processing server, and its internal structure diagram may be as shown in FIG. 7.
  • the computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, a computer program, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
  • the database of the computer device is used to store data such as the color value of the target color.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer program is executed by the processor to realize an image color migration method.
  • FIG. 7 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • the specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • a computer device including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor implements the following steps when the processor executes the computer program:
  • Extract the color value of the main color of the image to be converted determine the migration vector used when the target color is transferred to the image to be converted according to the color value of the main color of the image to be converted and the color value of the target color; according to the migration vector, the target The color is transferred to the image to be converted.
  • the processor executes a computer program to determine the migration vector used when the target color is transferred to the image to be converted according to the color value of the main color of the image to be converted and the color value of the target color, and the following is also achieved: step:
  • the two-dimensional and three-dimensional color vector determines the migration vector.
  • the processor executes the computer program to realize the following steps when determining the migration vector according to the first three-dimensional color vector and the second three-dimensional color vector:
  • the processor executes the computer program to realize the following steps when the target color is migrated to the image to be converted according to the migration vector:
  • the processor executes the computer program to realize the following steps when the color value of the pixel of the image to be converted is migrated according to the migration vector:
  • the color values of the pixels of the image to be converted are respectively migrated according to the brightness dimension, the saturation dimension and the hue dimension in the target color space.
  • the processor executes a computer program to realize the migration of the color values of the pixels of the image to be converted according to the brightness dimension, the saturation dimension, and the hue dimension according to the migration vector, the following steps are also implemented:
  • the brightness data corresponding to the brightness dimension in the color values of the pixels of the image to be converted is normalized to obtain the first value; according to the migration vector and the first value, the pixels of the image to be converted are The color value is migrated according to the brightness dimension; according to the second normalization function, the saturation data corresponding to the saturation dimension in the color value of the pixel of the image to be converted is normalized to obtain the second value; according to the migration vector and the first Two values, the color value of the pixel of the image to be converted is migrated according to the saturation dimension; the sum of the migration vector and the color value of the pixel of the image to be converted is obtained, and the sum is the remainder of 2 ⁇ , and the remainder is converted according to the remainder result
  • the color values of the pixels of the image migrate according to the hue dimension; ⁇ is the pi.
  • the color quantization algorithm is used to sample the image to be converted to obtain multiple quantized colors; the color with the highest occurrence probability among the multiple colors is used as the main color of the image to be converted.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
  • Extract the color value of the main color of the image to be converted determine the migration vector used when the target color is transferred to the image to be converted according to the color value of the main color of the image to be converted and the color value of the target color; according to the migration vector, the target The color is transferred to the image to be converted.
  • the computer program is executed by the processor, and according to the color value of the main color of the image to be converted and the color value of the target color, when the migration vector used when the target color is migrated to the image to be converted is determined, the following is also achieved step:
  • the two-dimensional and three-dimensional color vector determines the migration vector.
  • the computer program is executed by the processor, and when the migration vector is determined according to the first three-dimensional color vector and the second three-dimensional color vector, the following steps are further implemented:
  • the computer program is executed by the processor, and when the target color is transferred to the image to be converted according to the transfer vector, the following steps are further implemented:
  • the computer program is executed by the processor, and when the color value of the pixel of the image to be converted is migrated according to the migration vector, the following steps are further implemented:
  • the color values of the pixels of the image to be converted are respectively migrated according to the brightness, saturation, and hue dimensions in the target color space; the target color space includes the brightness, saturation, and hue dimensions.
  • the computer program is executed by the processor, and according to the migration vector, when the color values of the pixels of the image to be converted are respectively migrated according to the brightness dimension, the saturation dimension and the hue dimension, the following steps are also implemented:
  • the brightness data corresponding to the brightness dimension in the color values of the pixels of the image to be converted is normalized to obtain the first value; according to the migration vector and the first value, the pixels of the image to be converted are The color value is migrated according to the brightness dimension; according to the second normalization function, the saturation data corresponding to the saturation dimension in the color value of the pixel of the image to be converted is normalized to obtain the second value; according to the migration vector and the first Two values, the color value of the pixel of the image to be converted is migrated according to the saturation dimension; the sum of the migration vector and the color value of the pixel of the image to be converted is obtained, and the sum is the remainder of 2 ⁇ , and the remainder is converted according to the remainder result
  • the color values of the pixels of the image migrate according to the hue dimension; ⁇ is the pi. .
  • the following steps are also implemented: use a color quantization algorithm to sample the image to be converted to obtain multiple quantized colors; use the color with the highest probability of occurrence among the multiple colors as the waiting Convert the main color of the image.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Color Image Communication Systems (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本申请涉及一种图像颜色迁移方法、装置、计算机设备和存储介质。所述方法包括:提取待转换图像的主颜色的颜色值;根据待转换图像的主颜色的颜色值和目标颜色的颜色值,确定出将目标颜色迁移到待转换图像时采用的迁移向量;根据迁移向量,将目标颜色迁移到待转换图像。本方法能够在无需参考图片的情况下实现颜色迁移。

Description

图像颜色迁移方法、装置、计算机设备和存储介质 技术领域
本申请涉及图像处理技术领域,特别是涉及一种图像颜色迁移方法、装置、计算机设备和存储介质。
背景技术
随着电子商务的快速发展,电商平台经常会推出各种商品促销活动,而这也加大了对平面设计广告的需求量。对于某些类型的平面设计,可能需要根据不同氛围以及场景将广告图的颜色转换为合适的主色,以给用户更好的视觉体验。
颜色迁移技术能够将图像颜色转换为其他颜色。目前,定向颜色迁移方法是实现颜色迁移功能的主要方法,而该方法需要一张参考图像,这就无法适应很多应用场景。比如大多平面设计的应用场景为:只给定一个目标色的十六进制颜色码,然后需要通过颜色迁移后的图片在视觉效果上尽可能接近这个颜色。因此,无法采用定向颜色迁移方法实现图像的颜色迁移。
发明内容
基于此,有必要针对上述技术问题,提供一种能够在无需参考图片的情况下实现颜色迁移的图像颜色迁移方法、装置、计算机设备和存储介质。
一种图像颜色迁移方法,该方法包括:
提取待转换图像的主颜色的颜色值;
根据待转换图像的主颜色的颜色值和目标颜色的颜色值,确定出将目标颜色迁移到待转换图像时采用的迁移向量;
根据迁移向量,将目标颜色迁移到待转换图像。
在其中一个实施例中,根据待转换图像的主颜色的颜色值和目标颜色的颜色值,确定出将目标颜色迁移到待转换图像时采用的迁移向量,包括:
获取待转换图像的主颜色的颜色值在目标颜色空间中对应的第一三维颜色向量;
获取目标颜色的颜色值在目标颜色空间中对应的第二三维颜色向量;
根据第一三维颜色向量和第二三维颜色向量确定出迁移向量。
在其中一个实施例中,根据第一三维颜色向量和第二三维颜色向量确定出迁移向量,包括:
获取将第一三维颜色向量平移到第二三维颜色时采用的平移变换向量,将平移变换向量作为迁移向量。
在其中一个实施例中,根据迁移向量,将目标颜色迁移到待转换图像,包括:
提取待转换图像的像素的颜色值;
根据迁移向量,将待转换图像的像素的颜色值进行迁移,将迁移后的待转换图像作为目标图像;
目标图像为将目标颜色迁移到待转换图像后的图像。
在其中一个实施例中,根据迁移向量,将待转换图像的像素的颜色值进行迁移,包括:
根据迁移向量,将待转换图像的像素的颜色值分别按照所述目标颜色空间中的亮度维度、饱和度维度和色相维度进行迁移。
在其中一个实施例中,根据所述迁移向量,将待转换图像的像素的颜色值分别按照亮度维度、饱和度维度和色相维度进行迁移,包括:
根据第一归一化函数,将待转换图像的像素的颜色值中亮度维度对应的亮度数据进行归一化处理,得到第一数值;
根据迁移向量以及第一数值,将待转换图像的像素的颜色值按照亮度维度进行迁移;
根据第二归一化函数,将待转换图像的像素的颜色值中饱和度维度对 应的饱和度数据进行归一化处理,得到第二数值;
根据迁移向量以及第二数值,将待转换图像的像素的颜色值按照饱和度维度进行迁移;
获取所述迁移向量和所述待转换图像的像素的颜色值的和值,将所述和值对2π取余,根据取余结果将所述待转换图像的像素的颜色值按照色相维度进行迁移;π为圆周率。
在其中一个实施例中,该图像颜色迁移方法还包括:
使用颜色量化算法对待转换图像进行采样处理,得到量化后的多个颜色;
将多个颜色中出现概率最大的颜色作为待转换图像的主颜色。
一种图像颜色迁移装置,该装置包括:
提取模块,用于提取待转换图像的主颜色的颜色值;
确定模块,用于根据待转换图像的主颜色的颜色值和目标颜色的颜色值,确定出将目标颜色迁移到待转换图像时采用的迁移向量;
迁移模块,用于根据迁移向量,将目标颜色迁移到待转换图像。
一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现上述任一实施例方法的步骤。
一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述任一实施例的方法的步骤。
上述图像颜色迁移方法、装置、计算机设备和存储介质,当确定出迁移到待转换图像中的目标颜色的颜色值时,提取待转换图像的主颜色的颜色值,通过待转换图像的主颜色的颜色值以及目标颜色的颜色值,确定出进行颜色迁移的迁移向量,最终可根据迁移向量将目标颜色迁移到待转换图像。因此,无需目标参考图,即可实现待转换图像的颜色迁移,打破传统颜色迁移技术需要参考图片的局限,使得颜色迁移技术满足更多的应用场景。
附图说明
图1为一个实施例中一种图像颜色迁移方法的应用环境图;
图2为一个实施例中一种图像颜色迁移方法的流程示意图;
图3为一个实施例中S200步骤的流程示意图;
图4为一个实施例中一种图像颜色迁移方法的采用两组不同的归一化函数进行颜色迁移时的界面图像显示图;
图5为另一个实施例一种图像颜色迁移方法的界面图像显示图;
图6为一个实施例中一种图像颜色迁移装置的结构框图;
图7为一个实施例中计算机设备的内部结构图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供一种图像颜色迁移方法,可以应用于如图1所示的应用环境中。其中,服务器10与存储设备20通过网络进行通信。存储设备20中存储有多张图像。每张图像上设置有颜色和图像,还可以有对应的文字和数字等。服务器10用于从存储设备20中读取图像,并对图像进行颜色迁移处理,以得到符合需求的图像。具体地,服务器10中存储有多种颜色的色值。服务器10通过接收到的颜色迁移指令,从存储设备20中读取出待转换图像以及从内部存储中确定出对应的目标颜色的颜色值。进一步地,采用本申请提供图像颜色迁移方法,根据目标颜色的颜色值实现将目标颜色迁移到待转换图像中,从而使得满足颜色迁移指令的目标图像。此外,服务器10通过网络与终端设备群40进行通信。一般地,服务器10通过云端网络30与终端设备群40进行通信,将颜色迁移后得到的目标图像下发到终端设备群40的各个终端。终端设备群40的各个终端可以但不限于是 各种个人计算机、笔记本电脑、智能手机、平板电脑和台式计算机等,服务器10可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
在一个实施例中,如图2所示,提供了一种图像颜色迁移方法,以该方法应用于图1中的服务器为例进行说明,包括以下步骤:
S100,提取待转换图像的主颜色的颜色值。
在本实施例中,后台存储设备中存储有多张用于进行颜色迁移的图像。服务器根据接收到的颜色迁移指令,从后台存储设备中获取待转换图像。待转换图像的图像格式为JPG、JPEG、TIFF、PNG、RAW或者BMP等。此外,服务器还根据接收到的颜色迁移指令,确定出用于迁移到待转换图像上的目标颜色。目标颜色可以是以颜色值的形式存储在服务器中或者存储在后台存储设备中,还可以是以颜色图像的形式存储在服务器中或者存储在后台存储设备中。
进一步地,服务器获取待转换图像的主颜色,进而提取该主颜色的颜色值。主颜色的颜色值可以是十六进制颜色码,也可以是RGB值、HSV值等任意形式。
在一实施例中,该图像颜色迁移方法还包括:使用颜色量化算法对待转换图像进行采样处理,得到量化后的多个颜色;将多个颜色中出现概率最大的颜色作为待转换图像的主颜色。
具体地,服务器使用OpenCV(Open Source Computer Vision Library,开源计算机视觉库)库读取待转换图像,并采用颜色量化算法对待转换图像进行采样处理,每次采样得到一个颜色,从而得到量化后的多个颜色;将采样后得到的多个颜色中出现概率最大数量最多的颜色作为待转换图像的主颜色。具体地,颜色量化算法包括中位切分法、K-means聚类法、八叉树法、频度序列法等等。在一实施方式中,采用中位切分法(Modified Median Cut Quantization,MMCQ)作为颜色量化算法处理待转换图像,得到多个输出颜色,选择多个输出颜色中出现频率最高的颜色作为待转换图像的主颜色。
S200,根据待转换图像的主颜色的颜色值和目标颜色的颜色值,确定出将目标颜色迁移到待转换图像时采用的迁移向量。
在本实施例中,服务器确定出目标颜色之后,读取出该目标颜色的颜色值。进一步地,根据待转换图像的主颜色的颜色值和目标颜色的颜色值,确定出执行图像颜色迁移时的迁移向量。其中,迁移向量为将目标颜色迁移到待转换图像时参考的移动向量。待转换图像的主颜色的颜色值和目标颜色的颜色值为同一颜色空间内对应的颜色值,从而保证了获得迁移向量的可行性
在一实施例中,如图3所示,步骤S200,包括:
S210,获取待转换图像的主颜色的颜色值在目标颜色空间中对应的第一三维颜色向量。
S230,获取目标颜色的颜色值在目标颜色空间中对应的第二三维颜色向量。
S250,根据第一三维颜色向量和第二三维颜色向量确定出迁移向量。
在该实施例中,服务器将待转换图像的主颜色的颜色值和目标颜色的颜色值均放置在同一颜色空间中,然后进行计算得到迁移向量。具体地,服务器确定出目标颜色空间。目标颜色空间为三维颜色空间,三个维度分别用于表征颜色中的亮度通道、饱和度通道以及色相通道。该实施例采用的目标颜色空间为CIE-LCH颜色模型空间,当然也可以采用其他的颜色空间进行数值的转化计算。
服务器获取待转换图像的主颜色的颜色值在目标颜色空间中对应的第一三维颜色向量以及目标颜色的颜色值在目标颜色空间中对应的第二三维颜色向量,根据目标颜色空间中的第一三维颜色向量和第二三维颜色向量确定出迁移向量。此处的迁移向量也是目标颜色空间中对应的三维向量。
具体地,将待转换图像的主颜色和进行颜色迁移的目标颜色转换到CIE-LCH颜色模型空间。其中,转换方式可以使用python的第三方库,利用scikit-image图像处理包中对应函数进行图像处理。此外,如果待转换图 像存在透明通道,此时将透明通道抽离后进行转换,并单独保存透明通道。因此,在CIE-LCH颜色模型空间下,对待转换图像的主颜色的颜色值以及目标颜色的颜色值进行处理以确定出迁移向量,其中利用了CIE-LCH颜色模型空间对于同一变换的响应具有区间均匀的性质,因此可保证颜色迁移的可控性。
对于传统的数字图像色彩处理,常用的HSV、HSL、RGB等颜色模型空间,这些颜色空间对于不同颜色的像素处理,对同一种变换的响应程度在视觉效果上差别较大。以HSV空间为例,对于色相分别处于黄色和蓝色区域的两个像素,同样将饱和度调高5,黄色像素的视觉观感变化十分剧烈,而蓝色像素在视觉观感上没有很大变化。因此在应用一致的颜色变换时,不同颜色像素的视觉观感变化不可控,导致生成的图像不具有可读性。而本申请实施例采用的CIE-LCH颜色模型空间,很好的解决了传统的颜色迁移中的不可控性。
在一实施例中,步骤S250,包括:获取将第一三维颜色向量平移到第二三维颜色时采用的平移变换向量,将平移变换向量作为迁移向量。
在该实施例中,在目标颜色空间中确定出待转换图像的主颜色的颜色值对应的第一三维颜色向量以及目标颜色的颜色值对应的第二三维颜色向量之后,将第一三维颜色向量平移到第二三维颜色向量,得到平移过程采用的平移变换向量,将该平移变换向量作为迁移向量。具体地,在CIE-LCH颜色模型空间中,平移变换向量为dist lch,则平移变换向量的计算方式如下:
dist lch=lch target-lch theme
其中,lch target表示第二三维颜色向量;lch theme表示第一三维颜色向量。dist lch是平移变换向量。每个维度表示对应维度在CIE-LCH颜色模型空间中对应坐标轴移动的距离。dist lch的模是在CIE-LCH颜色空间下,第二三维颜色向量和第一三维颜色向量之间的欧氏距离。
因此,将第一三维颜色向量平移到第二三维颜色时采用的平移变换向量作为迁移向量,后续采用该迁移向量将目标颜色迁移到待转换图像时, 基本上维持了不同颜色区域间的颜色对比关系,不会破坏待转换图像的配色规则,迁移后生成的图像更加美观。
S300,根据迁移向量,将目标颜色迁移到待转换图像。
在本实施例中,服务器根据迁移向量,将目标颜色迁移到待转换图像中从而实现图像颜色迁移。在具体的实施方式中,可以是,将待转换图像所有的颜色值,按照迁移向量进行颜色值的移动,移动后得到的图像中,显现出来的颜色即为目标颜色迁移到待转换图像后的颜色效果。还可以是,待转换图像部分的颜色值,按照迁移向量进行颜色值的移动,移动后得到的图像中,显现出来的颜色即为目标颜色迁移到待转换图像后的颜色效果。因此,克服了传统颜色迁移技术需要参考图片的局限。
在一实施例中,迁移向量根据在目标颜色空间中待转换图像的主颜色的颜色值对应的第一三维颜色向量以及目标颜色的颜色值对应的第二三维颜色向量确定出的三维向量。此时,步骤S300,包括:提取待转换图像的像素的颜色值,根据迁移向量,将待转换图像的像素的颜色值进行迁移,将迁移后的待转换图像作为目标图像,目标图像为将目标颜色迁移到待转换图像后的图像。
具体地,在执行颜色迁移时,提取待转换图像的像素的颜色值,将像素的颜色值按照迁移向量进行迁移,迁移后得到的目标图像中,显示的颜色即为目标颜色在该待转换图像中的颜色显示结果,因此实现了将目标颜色迁移到待转换图像。其中,可以是将待转换图像的所有像素的颜色值,按照迁移向量进行迁移,将迁移后的待转换图像作为目标图像。也可以是,将待转换图像的部分像素的颜色值,按照迁移向量进行迁移,将迁移后的待转换图像作为目标图像。
在一实施例中,根据迁移向量,将待转换图像的像素的颜色值进行迁移,包括:根据迁移向量,将待转换图像的像素的颜色值分别按照亮度维度、饱和度维度和色相维度进行迁移;其中,目标颜色空间包括亮度维度、饱和度维度和色相维度。
具体地,目标颜色空间为三维空间,三维空间中对应的三个维度分为别亮度维度、饱和度维度和色相维度。也即是,待转换图像的像素的颜色值在目标颜色空间中体现为三个维度值表征的数值,三个维度值分别表征像素的亮度、饱和度和色相。此外,迁移向量为三维向量,三个维度分别表征颜色对应的亮度、饱和度和色相。在目标颜色空间中,待转换图像的像素的颜色值按照迁移向量进行迁移,迁移后的图像即为将目标颜色迁移到待转换图像的图像。其中,颜色迁移过程,可以是将待转换图像的所有像素的颜色值按照迁移向量进行迁移,也可以是将待转换图像的部分像素的颜色值按照迁移向量进行迁移。
在该实施例的一个实施方式中,根据迁移向量,将待转换图像的像素的颜色值分别按照亮度维度、饱和度维度和色相维度进行迁移,包括:根据第一归一化函数,将待转换图像的像素的颜色值中亮度维度对应的亮度数据进行归一化处理,得到第一数值;根据迁移向量以及第一数值,将待转换图像的像素的颜色值按照亮度维度进行迁移;根据第二归一化函数,将待转换图像的像素的颜色值中饱和度维度对应的饱和度数据进行归一化处理,得到第二数值;根据迁移向量以及第二数值,将待转换图像的像素的颜色值按照饱和度维度进行迁移;获取迁移向量和待转换图像的像素的颜色值的和值,将和值对2π取余,根据取余结果将待转换图像的像素的颜色值按照色相维度进行迁移;π为圆周率。
具体地,将待转换图像的所有像素的颜色值按照迁移向量进行迁移。待转换图像的像素在目标颜色空间中按照迁移向量进行迁移时,按照以下方式进行:
p i,j[L]′=p i,j[L]+f l(p i,j[L])*dist lch[L];
p i,j[C]′=p i,j[C]+f c(p i,j[C])*dist lch[C];
p i,j[H]′=(p i,j[H]+dist lch[H])MOD2π;
其中,i,j分别是图像中的二维坐标,L表示亮度维度,C表示饱和度维度,H表示色相维度。p i,j[L]表示待转换图像在亮度维度上的值,p i,j[C] 表示待转换图像在饱和度维度上的值,p i,j[H]表示待转换图像在色相维度上的值。f l(p i,j[L])表示第一归一化函数,f c(p i,j[C])表示第二归一化函数,MOD表示取余运算。dist lch[L]表示迁移向量在亮度维度上的值,dist lch[C]表示迁移向量在饱和度维度上的值,dist lch[H]表示迁移向量在色相维度上的值。p i,j[L]′表示待转换图像在亮度维度迁移后得到的值,p i,j[C]′表示待转换图像在饱和度维度迁移后得到的值,p i,j[H]′表示待转换图像在色相维度迁移后得到的值。
第一归一化函数f l(p i,j[L])为:
Figure PCTCN2020105933-appb-000001
第二归一化函数f c(p i,j[C])为:
Figure PCTCN2020105933-appb-000002
其中,p i,j[L]和p i,j[C]的定义域为[0,100],p i,j[H]的定义域为[0,2π]。f l(p i,j[L])和f c(p i,j[C])值域为[0,1],p i,j[H]'的值域为[0,2π]。
另外,第一归一化函数f l(p i,j[L])还可以为:
Figure PCTCN2020105933-appb-000003
第二归一化函数f c(p i,j[C])还可以为:
Figure PCTCN2020105933-appb-000004
本实施例使用归一化函数对待转换图像做了限定,以尽可能保证经过变换后的像素的色值仍落在定义域内。此外,定义的归一化函数在整个定义域内连续,这样保证颜色迁移后的图像,在各个边缘区域不会产生撕裂感,增强了可读性。
第一归一化函数和第二归一化函数的选择可以是多样的,其物理意义上服从的约束是:
对于亮度通道,归一化函数值域为[0,1],在定义域内关于x=50轴对称,x<50时函数单调递增,x>50时函数单调递减,且在x=50时取最到最大值1。这是因为黑色、白色的区域一般是不希望参与颜色变换的区域,比如黑白色的文案。通过归一化函数对平移向量进行加权,以保证原图中黑色、白色的文案颜色基本不变。
关于饱和度通道,归一化函数在定义域内单调递增,值域为[0,1]。这样确保原色值饱和度较低时,其饱和度的变化幅度也应较低,避免在颜色转换后出现色值不准确。
以下以两组不同的归一化函数举例,对于同样的输入达到了不同的效果:
第一组:
第一归一化函数f l(p i,j[L])为:
Figure PCTCN2020105933-appb-000005
第二归一化函数f c(p i,j[C])为:
Figure PCTCN2020105933-appb-000006
第二组:
第一归一化函数f l(p i,j[L])为:
Figure PCTCN2020105933-appb-000007
第二归一化函数f c(p i,j[C])为:
Figure PCTCN2020105933-appb-000008
分别采用两组函数进行颜色迁移后,结果显示图如图4所示。参见图4,将目标颜色的颜色图11,采用第一组函数实现颜色迁移后,得到的新图像为图像22,采用第二组函数实现颜色迁移后,得到的新图像为图像33。对比图像22和图像33可知,将目标颜色迁移后,图像22中的图像以及文案的显示效果与图像33中的图像以及文案的显示效果存在明显差异。
其中使用第一组数函数生成的图片,文案对比度有所下降,而使用第二组函数生成的图片,文案的对比度清晰,但色彩饱和度和亮度有所下降。
归一化函数的选择是主观的,本申请给出的两组归一化函数是经过实验认为呈现效果较好的两组,在保证了生成图片的基本效果的前提下,分别侧重于明亮和相对稳重的场景。实际上服从上述约束条件的函数,都可以作为归一化函数,但也会对生成图片有不同的影响。
在一实施例中,步骤S300之后,该图像颜色迁移方法还包括:将目标颜色迁移到待转换图像后得到的图像转换为对应目标格式的图像。
具体地,在实现将目标颜色迁移到待转换图像的过程中,需要将目标颜色以及待转换图像转换到目标颜色空间中进行处理,得到迁移后的图像也为目标颜色空间下的图像。因此,需要将迁移后得到的图像转换为需求对应的目标格式的图像,最后输出目标格式的图像。也可以是,可以将目标颜色迁移到待转换图像后得到的图像按照各种需求进行图像的格式转换。例如,待转换图像和目标色均为RGB颜色空间下表征的图像和颜色,将两者转换到CIE-LCH颜色模型空间进行颜色迁移处理后,将迁移后得到的图像再转换回RGB颜色空间,最后输出RGB颜色空间下的图像。
上述图像颜色迁移方法,当确定出迁移到待转换图像中的目标颜色的颜色值时,提取待转换图像的主颜色的颜色值,通过待转换图像的主颜色的颜色值以及目标颜色的颜色值,确定出进行颜色迁移的迁移向量,最终可根据迁移向量将目标颜色迁移到待转换图像。因此,无需目标参考图,即可实现待转换图像的颜色迁移,打破传统颜色迁移技术需要参考图片的局限,使得颜色迁移技术满足更多的应用场景。
为了更好地说明上述实施例的一种图像颜色迁移方法,以下给出一具体实施例:
1、使用OpenCV库读取待处理的图片,即待转换图像。
2、使用中位切分法(Modified Median Cut Quantization,MMCQ)处理取待处理的图片,得到10个输出颜色,选择出现频率最高的颜色作为待处理的图片的主颜色。
3、将得到的主颜色和需要颜色迁移的目标颜色转换到CIE-LCH颜色模型空间,可以使用python的第三方库,scikit-image中的对应函数进行图像处理,得到主颜色的色值和目标颜色的色值。如果待处理的图片存在透明通道,将透明通道抽离后进行转换,并单独保存透明通道。
4、使用得到的主颜色的色值和目标颜色的色值,使用Numpy多维数组的向量减法,计算出在CIE-LCH颜色模型空间中,从主颜色的色值到目标颜色的色值下的平移变换向量。
5、使用Numpy多维数组的向量加法,对待处理的图片中每个像素根据平移变换向量做对应变换,得到变换后的图片。
6、将变换后的图片由CIE-LCH颜色模型空间转换回RGB颜色空间,具体可以使用python的第三方库,采用scikit-image中的对应函数进行图像处理。同样地,如果变换后的图片存在透明通道,使用Numpy多维数组中的Numpy.concatenate函数,将转换后的图片加上在步骤3中保存的透明通道,得到目标图片。
7、完成,输出变换后目标图片。
在该实施方式中,其实现的结果如图5所示。将目标色44迁移到待处理图片55中,最终迁移后得到目标图片66。
因此,在对于已有的设计图有新的配色需求时,根据本申请的技术实施方案,只需要输入已有的模板位图和根据需求指定的目标色值,可在数秒内根据原模板得到颜色迁移后的图片,后续只需要人工审核或者微调即可。不仅极大的减少了设计师的重复劳动,同时,在***中只需要维护一个PSD(Photoshop特有的图像文件格式)文件,可以在接到配色需求后实时生成所需要的图片,大大节省了存储资源。
应该理解的是,虽然流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,流程图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
在一个实施例中,如图6所示,提供了一种图像颜色迁移装置,包括:提取模块100、确定模块200和迁移模块300,其中:
提取模块100,用于提取待转换图像的主颜色的颜色值。
确定模块200,用于根据待转换图像的主颜色的颜色值和目标颜色的颜色值,确定出将目标颜色迁移到待转换图像时采用的迁移向量。
迁移模块300,用于根据迁移向量,将目标颜色迁移到待转换图像。
在其中一个实施例中,确定模块200可以包括(图6未示出):
第一获取单元,用于获取待转换图像的主颜色的颜色值在目标颜色空间中对应的第一三维颜色向量。
第二获取单元,用于获取目标颜色的颜色值在目标颜色空间中对应的第二三维颜色向量。
确定单元,用于根据第一三维颜色向量和第二三维颜色向量确定出迁移向量。
在其中一个实施例中,确定单元可以包括:
确定子单元,用于获取将第一三维颜色向量平移到第二三维颜色时采用的平移变换向量,将平移变换向量作为迁移向量。
在其中一个实施例中,迁移模块300可以包括(图6未示出):
提取单元,用于提取所述待转换图像的像素的颜色值。
迁移单元,用于根据迁移向量,将待转换图像的像素的颜色值进行迁移,将迁移后的所述待转换图像作为目标图像;
目标图像为将目标颜色迁移到待转换图像后的图像。
在其中一个实施例中,迁移单元还包括:
迁移子单元,用于根据迁移向量,将待转换图像的像素的颜色值分别按照目标颜色空间中的亮度维度、饱和度维度和色相维度进行迁移。
在其中一个实施例中,迁移子单元还包括(图6未示出):
第一处理单元,用于根据第一归一化函数,将待转换图像的像素的颜色值中亮度维度对应的亮度数据进行归一化处理,得到第一数值;根据迁移向量以及第一数值,将待转换图像的像素的颜色值按照亮度维度进行迁移;
第二处理单元,用于根据第二归一化函数,将待转换图像的像素的颜 色值中饱和度维度对应的饱和度数据进行归一化处理,得到第二数值;根据迁移向量以及第二数值,将待转换图像的像素的颜色值按照饱和度维度进行迁移;
第三处理单元,用于获取迁移向量和待转换图像的像素的颜色值的和值,将和值对2π取余,根据取余结果将待转换图像的像素的颜色值按照色相维度进行迁移;π为圆周率。
在其中一个实施例中,该图像颜色迁移装置,还包括(图6未示出):
切分模块,使用颜色量化算法对所述待转换图像进行采样处理,得到量化后的多个颜色;将多个颜色中出现概率最大的颜色作为待转换图像的主颜色。
关于图像颜色迁移装置的具体限定可以参见上文中对于图像颜色迁移方法的限定,在此不再赘述。上述图像颜色迁移装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,提供了一种计算机设备,该计算机设备可以是图像处理的服务器,其内部结构图可以如图7所示。该计算机设备包括通过***总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作***、计算机程序和数据库。该内存储器为非易失性存储介质中的操作***和计算机程序的运行提供环境。该计算机设备的数据库用于存储目标颜色的颜色值等数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种图像颜色迁移方法。
本领域技术人员可以理解,图7中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或 者组合某些部件,或者具有不同的部件布置。
在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现以下步骤:
提取待转换图像的主颜色的颜色值;根据待转换图像的主颜色的颜色值和目标颜色的颜色值,确定出将目标颜色迁移到待转换图像时采用的迁移向量;根据迁移向量,将目标颜色迁移到待转换图像。
在一个实施例中,处理器执行计算机程序,实现根据待转换图像的主颜色的颜色值和目标颜色的颜色值,确定出将目标颜色迁移到待转换图像时采用的迁移向量时,还实现以下步骤:
获取待转换图像的主颜色的颜色值在目标颜色空间中对应的第一三维颜色向量;获取目标颜色的颜色值在目标颜色空间中对应的第二三维颜色向量;根据第一三维颜色向量和第二三维颜色向量确定出迁移向量。
在一个实施例中,处理器执行计算机程序,实现根据第一三维颜色向量和第二三维颜色向量确定出迁移向量时,还实现以下步骤:
获取将第一三维颜色向量平移到第二三维颜色时采用的平移变换向量,将平移变换向量作为迁移向量。
在一个实施例中,处理器执行计算机程序,实现根据迁移向量,将目标颜色迁移到待转换图像时,还实现以下步骤:
提取待转换图像的像素的颜色值;根据迁移向量,将待转换图像的像素的颜色值进行迁移,将迁移后的待转换图像作为目标图像;目标图像为将目标颜色迁移到待转换图像后的图像。
在一个实施例中,处理器执行计算机程序,实现根据迁移向量,将待转换图像的像素的颜色值进行迁移时,还实现以下步骤:
根据迁移向量,将待转换图像的像素的颜色值分别按照目标颜色空间中的亮度维度、饱和度维度和色相维度进行迁移。
在一个实施例中,处理器执行计算机程序,实现根据迁移向量,将待 转换图像的像素的颜色值分别按照亮度维度、饱和度维度和色相维度进行迁移时,还实现以下步骤:
根据第一归一化函数,将待转换图像的像素的颜色值中亮度维度对应的亮度数据进行归一化处理,得到第一数值;根据迁移向量以及第一数值,将待转换图像的像素的颜色值按照亮度维度进行迁移;根据第二归一化函数,将待转换图像的像素的颜色值中饱和度维度对应的饱和度数据进行归一化处理,得到第二数值;根据迁移向量以及第二数值,将待转换图像的像素的颜色值按照饱和度维度进行迁移;获取迁移向量和待转换图像的像素的颜色值的和值,将和值对2π取余,根据取余结果将待转换图像的像素的颜色值按照色相维度进行迁移;π为圆周率。
在一个实施例中,处理器执行计算机程序时,还实现以下步骤:
使用颜色量化算法对待转换图像进行采样处理,得到量化后的多个颜色;将多个颜色中出现概率最大的颜色作为待转换图像的主颜色。
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:
提取待转换图像的主颜色的颜色值;根据待转换图像的主颜色的颜色值和目标颜色的颜色值,确定出将目标颜色迁移到待转换图像时采用的迁移向量;根据迁移向量,将目标颜色迁移到待转换图像。
在一个实施例中,计算机程序被处理器执行,根据待转换图像的主颜色的颜色值和目标颜色的颜色值,确定出将目标颜色迁移到待转换图像时采用的迁移向量时,还实现以下步骤:
获取待转换图像的主颜色的颜色值在目标颜色空间中对应的第一三维颜色向量;获取目标颜色的颜色值在目标颜色空间中对应的第二三维颜色向量;根据第一三维颜色向量和第二三维颜色向量确定出迁移向量。
在一个实施例中,计算机程序被处理器执行,根据第一三维颜色向量和第二三维颜色向量确定出迁移向量时,还实现以下步骤:
获取将第一三维颜色向量平移到第二三维颜色时采用的平移变换向 量,将平移变换向量作为迁移向量。
在一个实施例中,计算机程序被处理器执行,根据迁移向量,将目标颜色迁移到待转换图像时,还实现以下步骤:
提取待转换图像的像素的颜色值;根据迁移向量,将待转换图像的像素的颜色值进行迁移,将迁移后的待转换图像作为目标图像;目标图像为将目标颜色迁移到待转换图像后的图像。
在一个实施例中,计算机程序被处理器执行,根据迁移向量,将待转换图像的像素的颜色值进行迁移时,还实现以下步骤:
根据迁移向量,将待转换图像的像素的颜色值分别按照目标颜色空间中的亮度维度、饱和度维度和色相维度进行迁移;其中,目标颜色空间包括亮度维度、饱和度维度和色相维度。
在一个实施例中,计算机程序被处理器执行,根据迁移向量,将待转换图像的像素的颜色值分别按照亮度维度、饱和度维度和色相维度进行迁移时,还实现以下步骤:
根据第一归一化函数,将待转换图像的像素的颜色值中亮度维度对应的亮度数据进行归一化处理,得到第一数值;根据迁移向量以及第一数值,将待转换图像的像素的颜色值按照亮度维度进行迁移;根据第二归一化函数,将待转换图像的像素的颜色值中饱和度维度对应的饱和度数据进行归一化处理,得到第二数值;根据迁移向量以及第二数值,将待转换图像的像素的颜色值按照饱和度维度进行迁移;获取迁移向量和待转换图像的像素的颜色值的和值,将和值对2π取余,根据取余结果将待转换图像的像素的颜色值按照色相维度进行迁移;π为圆周率。。
在一个实施例中,计算机程序被处理器执行时,还实现以下步骤:使用颜色量化算法对待转换图像进行采样处理,得到量化后的多个颜色;将多个颜色中出现概率最大的颜色作为待转换图像的主颜色。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序 可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (10)

  1. 一种图像颜色迁移方法,所述方法包括:
    提取待转换图像的主颜色的颜色值;
    根据所述待转换图像的主颜色的颜色值和目标颜色的颜色值,确定出将目标颜色迁移到所述待转换图像时采用的迁移向量;
    根据所述迁移向量,将所述目标颜色迁移到所述待转换图像。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述待转换图像的主颜色的颜色值和目标颜色的颜色值,确定出将目标颜色迁移到所述待转换图像时采用的迁移向量,包括:
    获取所述待转换图像的主颜色的颜色值在目标颜色空间中对应的第一三维颜色向量;
    获取所述目标颜色的颜色值在所述目标颜色空间中对应的第二三维颜色向量;
    根据所述第一三维颜色向量和所述第二三维颜色向量确定出所述迁移向量。
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述第一三维颜色向量和所述第二三维颜色向量确定出所述迁移向量,包括:
    获取将所述第一三维颜色向量平移到所述第二三维颜色时采用的平移变换向量,将所述平移变换向量作为所述迁移向量。
  4. 根据权利要求2所述的方法,其特征在于,所述根据所述迁移向量,将所述目标颜色迁移到所述待转换图像,包括:
    提取所述待转换图像的像素的颜色值;
    根据所述迁移向量,将所述待转换图像的像素的颜色值进行迁移,将迁移后的所述待转换图像作为目标图像;
    所述目标图像为将所述目标颜色迁移到所述待转换图像后的图像。
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述迁移向量,将所述待转换图像的像素的颜色值进行迁移,包括:
    根据所述迁移向量,将所述待转换图像的像素的颜色值分别按照所述目标颜色空间中的亮度维度、饱和度维度和色相维度进行迁移。
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述迁移向量,将所述待转换图像的像素的颜色值分别按照亮度维度、饱和度维度和色相维度进行迁移,包括:
    根据第一归一化函数,将所述待转换图像的像素的颜色值中所述亮度维度对应的亮度数据进行归一化处理,得到第一数值;
    根据所述迁移向量以及所述第一数值,将所述待转换图像的像素的颜色值按照亮度维度进行迁移;
    根据第二归一化函数,将所述待转换图像的像素的颜色值中所述饱和度维度对应的饱和度数据进行归一化处理,得到第二数值;
    根据所述迁移向量以及所述第二数值,将所述待转换图像的像素的颜色值按照饱和度维度进行迁移;
    获取所述迁移向量和所述待转换图像的像素的颜色值的和值,将所述和值对2π取余,根据取余结果将所述待转换图像的像素的颜色值按照色相维度进行迁移;π为圆周率。
  7. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    使用颜色量化算法对所述待转换图像进行采样处理,得到量化后的多个颜色;
    将所述多个颜色中出现概率最大的颜色作为所述待转换图像的主颜色。
  8. 一种图像颜色迁移装置,其特征在于,所述装置包括:
    提取模块,用于提取待转换图像的主颜色的颜色值;
    确定模块,用于根据所述待转换图像的主颜色的颜色值和目标颜色的颜色值,确定出将目标颜色迁移到所述待转换图像时采用的迁移向量;
    迁移模块,用于根据所述迁移向量,将所述目标颜色迁移到所述待转换图像。
  9. 一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至7中任一项所述方法的步骤。
  10. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至7中任一项所述的方法的步骤。
PCT/CN2020/105933 2019-09-18 2020-07-30 图像颜色迁移方法、装置、计算机设备和存储介质 WO2021052028A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CA3154893A CA3154893C (en) 2019-09-18 2020-07-30 Image color transferring method, device, computer equipment and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910880382.4A CN110728722B (zh) 2019-09-18 2019-09-18 图像颜色迁移方法、装置、计算机设备和存储介质
CN201910880382.4 2019-09-18

Publications (1)

Publication Number Publication Date
WO2021052028A1 true WO2021052028A1 (zh) 2021-03-25

Family

ID=69219208

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/105933 WO2021052028A1 (zh) 2019-09-18 2020-07-30 图像颜色迁移方法、装置、计算机设备和存储介质

Country Status (3)

Country Link
CN (1) CN110728722B (zh)
CA (1) CA3154893C (zh)
WO (1) WO2021052028A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110728722B (zh) * 2019-09-18 2022-08-02 苏宁云计算有限公司 图像颜色迁移方法、装置、计算机设备和存储介质
CN111461996B (zh) * 2020-03-06 2023-08-29 合肥师范学院 一种图像快速智能调色方法
CN111612702B (zh) * 2020-04-07 2023-04-21 杭州电子科技大学 一种颜色迁移的中性色矫正后处理方法
CN112365457A (zh) * 2020-10-29 2021-02-12 浙江大学 一种基于地毯配色自适应空间的颜色迁移方法
CN114565506B (zh) * 2022-01-17 2023-04-18 北京新氧科技有限公司 图像颜色迁移方法、装置、设备及存储介质
CN114863095B (zh) * 2022-03-25 2023-11-28 电子科技大学 一种基于颜色转换的答题卡图像分割方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105261046A (zh) * 2015-09-23 2016-01-20 北京航空航天大学 一种场景自适应的色调迁移方法
US20160086377A1 (en) * 2014-09-19 2016-03-24 Qualcomm Incorporated Determining an image target's suitability for color transfer in an augmented reality environment
CN107464213A (zh) * 2017-08-03 2017-12-12 浙江大学 基于单色色盘的Lab空间映射的重着色方法
US10049297B1 (en) * 2017-03-20 2018-08-14 Beihang University Data driven method for transferring indoor scene layout and color style
CN109300169A (zh) * 2018-09-06 2019-02-01 华东师范大学 一种基于线性变换的半透明图像颜色迁移方法
CN110728722A (zh) * 2019-09-18 2020-01-24 苏宁云计算有限公司 图像颜色迁移方法、装置、计算机设备和存储介质

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050213125A1 (en) * 2002-08-19 2005-09-29 Paul Reed Smith Guitars, Limited Partnership Method of color accentuation with compensation and adjustment
CN103699532B (zh) * 2012-09-27 2017-08-25 中国电信股份有限公司 图像颜色检索方法和***
CN103198464B (zh) * 2013-04-09 2015-08-12 北京航空航天大学 一种基于单个参考视频的人脸视频光影迁移生成方法
CN105761283B (zh) * 2016-02-14 2018-12-25 广州神马移动信息科技有限公司 一种图片主色提取方法及装置
CN109636712B (zh) * 2018-12-07 2022-03-01 北京达佳互联信息技术有限公司 图像风格迁移及数据存储方法、装置和电子设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160086377A1 (en) * 2014-09-19 2016-03-24 Qualcomm Incorporated Determining an image target's suitability for color transfer in an augmented reality environment
CN105261046A (zh) * 2015-09-23 2016-01-20 北京航空航天大学 一种场景自适应的色调迁移方法
US10049297B1 (en) * 2017-03-20 2018-08-14 Beihang University Data driven method for transferring indoor scene layout and color style
CN107464213A (zh) * 2017-08-03 2017-12-12 浙江大学 基于单色色盘的Lab空间映射的重着色方法
CN109300169A (zh) * 2018-09-06 2019-02-01 华东师范大学 一种基于线性变换的半透明图像颜色迁移方法
CN110728722A (zh) * 2019-09-18 2020-01-24 苏宁云计算有限公司 图像颜色迁移方法、装置、计算机设备和存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
GUO-FEI HU, FU JIAN, PENG QUN-SHENG: "Adaptive Color Transfer", CHINESE JOURNAL OF COMPUTERS, vol. 27, no. 9, 1 September 2004 (2004-09-01), pages 1245 - 1249, XP055795350 *

Also Published As

Publication number Publication date
CA3154893A1 (en) 2021-03-25
CN110728722B (zh) 2022-08-02
CA3154893C (en) 2023-10-03
CN110728722A (zh) 2020-01-24

Similar Documents

Publication Publication Date Title
WO2021052028A1 (zh) 图像颜色迁移方法、装置、计算机设备和存储介质
US11373275B2 (en) Method for generating high-resolution picture, computer device, and storage medium
JP7490004B2 (ja) 機械学習を用いた画像カラー化
CN110648375B (zh) 基于参考信息的图像彩色化
JP6921924B2 (ja) ディープラーニング基盤の仮想ヘア染色方法及びこれを利用した仮想ヘア染色サービス提供方法
US9083918B2 (en) Palette-based image editing
WO2021115242A1 (zh) 一种超分辨率图像处理方法以及相关装置
CN112614060A (zh) 人脸图像头发渲染方法、装置、电子设备和介质
US9401027B2 (en) Method and apparatus for scene segmentation from focal stack images
KR101624801B1 (ko) 전경 물체 추출을 위한 매팅 방법 및 이를 수행하는 장치
CN113469092B (zh) 字符识别模型生成方法、装置、计算机设备和存储介质
WO2022227547A1 (zh) 用于图像处理的方法、装置、电子设备及存储介质
CN110189384B (zh) 基于Unity3D的图像压缩方法、装置、计算机设备和存储介质
WO2022089185A1 (zh) 图像处理方法和图像处理装置
CN109300170B (zh) 肖像照片光影传递方法
TWI711004B (zh) 圖片處理方法和裝置
WO2023207454A1 (zh) 图像处理方法、图像处理装置以及可读存储介质
WO2023272495A1 (zh) 徽标标注方法及装置、徽标检测模型更新方法及***、存储介质
CN113034358B (zh) 一种超分辨率图像处理方法以及相关装置
CN111488778A (zh) 图像处理方法及装置、计算机***和可读存储介质
US20240112377A1 (en) Method and apparatus for transforming input image based on target style and target color information
US20240212239A1 (en) Logo Labeling Method and Device, Update Method and System of Logo Detection Model, and Storage Medium
CN116977154B (zh) 可见光图像与红外图像融合储存方法、装置、设备和介质
CN117496214A (zh) 医学图像分类方法、装置、计算机设备和存储介质
CN115908115A (zh) 人脸图像处理方法、直播图像处理方法、装置和电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20866205

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 3154893

Country of ref document: CA

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20866205

Country of ref document: EP

Kind code of ref document: A1