CA3154893C - Image color transferring method, device, computer equipment and storage medium - Google Patents

Image color transferring method, device, computer equipment and storage medium Download PDF

Info

Publication number
CA3154893C
CA3154893C CA3154893A CA3154893A CA3154893C CA 3154893 C CA3154893 C CA 3154893C CA 3154893 A CA3154893 A CA 3154893A CA 3154893 A CA3154893 A CA 3154893A CA 3154893 C CA3154893 C CA 3154893C
Authority
CA
Canada
Prior art keywords
color
image
transformed
dimension
pixels
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CA3154893A
Other languages
French (fr)
Other versions
CA3154893A1 (en
Inventor
Chaowei Feng
Xiaoyang Wang
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
10353744 Canada Ltd
Original Assignee
10353744 Canada Ltd
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 10353744 Canada Ltd filed Critical 10353744 Canada Ltd
Publication of CA3154893A1 publication Critical patent/CA3154893A1/en
Application granted granted Critical
Publication of CA3154893C publication Critical patent/CA3154893C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

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

The present application relates to an image color migration method, an apparatus, a computer device and a storage medium. The method comprises: extracting a color value of a main color of an image to be converted; determining a migration vector adopted 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; and migrating the target color to the image to be converted according to the migration vector. The present method can realize color migration without reference pictures.

Description

IMAGE COLOR TRANSFERRING METHOD, DEVICE, COMPUTER EQUIPMENT
AND STORAGE MEDIUM
BACKGROUND OF THE INVENTION
Technical Field [0001] The present application relates to the field of image processing technology, and more particularly to an image color transferring method, and corresponding device, computer equipment and storage medium.
Description of Related Art
[0002] With the rapid development of the e-commerce, e-commerce platforms often carry out promotional activities for various commodities, and this enlarges the demand on graphic design advertisement. As regards graphic designs of certain types, it might be required to transform the color of an advertising picture to a suitable dominant color according to different atmospheres and scenarios, so as to provide users with better visual experience.
[0003] The color transfer technique makes it possible to transform the image color to other colors.
At present, the directional color transferring method is the main method to realize the color transferring function, but a reference image is required for this method, and this makes it impossible to adapt to many application scenarios. For instance, most graphic designs are applied to such an application scenario that only a hexadecimal color code of a target color is given, and the picture is subsequently rendered through color transfer to approach this color in visual effect as approximate as possible. Accordingly, it is impossible to realize color transfer of images through the directional color transferring method.

Date Recue/Date Received 2022-03-17 SUMMARY OF THE INVENTION
[0004] In view of the above technical problems, there is an urgent need to provide an image color transferring method, and corresponding device, computer equipment and storage medium capable of realizing color transfer without any reference picture.
[0005] There is provided an image color transferring method that comprises:
[0006] extracting a color value of a dominant color of an image to be transformed;
[0007] determining a transfer vector used in transferring a target color to the image to be transformed according to the color value of the dominant color of the image to be transformed and a color value of the target color; and
[0008] transferring the target color to the image to be transformed according to the transfer vector.
[0009] In one of the embodiments, the step of determining a transfer vector used in transferring a target color to the image to be transformed according to the color value of the dominant color of the image to be transformed and a color value of the target color includes:
[0010] obtaining a corresponding first three-dimensional color vector of the color value of the dominant color of the image to be transformed in a target color space;
[0011] obtaining a corresponding second three-dimensional color vector of the color value of the target color in the target color space; and
[0012] determining the transfer vector according to the first three-dimensional color vector and the second three-dimensional color vector.
[0013] In one of the embodiments, the step of determining the transfer vector according to the first three-dimensional color vector and the second three-dimensional color vector includes:
[0014] obtaining a translation transformation vector used in translating the first three-dimensional color vector to the second three-dimensional color, and taking the translation transformation vector as the transfer vector.

Date Recue/Date Received 2022-03-17
[0015] In one of the embodiments, the step of transferring the target color to the image to be transformed according to the transfer vector includes:
[0016] extracting a color value of pixels of the image to be transformed; and
[0017] transferring the color value of the pixels of the image to be transformed according to the transfer vector, and taking the image to be transformed after transferring as a target image;
[0018] the target image is an image formed after the target color has been transferred to the image to be transformed.
[0019] In one of the embodiments, the step of transferring the color value of the pixels of the image to be transformed according to the transfer vector includes:
[0020] transferring the color value of the pixels of the image to be transformed in accordance with a luminance dimension, a saturation dimension and a hue dimension, respectively, in the target color space according to the transfer vector.
[0021] In one of the embodiments, the step of transferring the color value of the pixels of the image to be transformed in accordance with a luminance dimension, a saturation dimension and a hue dimension, respectively, in the target color space according to the transfer vector includes:
[0022] normalizing the luminance data to which the luminance dimension in the color value of the pixels of the image to be transformed corresponds according to a first normalization function, and obtaining a first numerical value;
[0023] transferring the color value of the pixels of the image to be transformed in accordance with the luminance dimension according to the transfer vector and the first numerical value;
[0024] normalizing the saturation data to which the saturation dimension in the color value of the pixels of the image to be transformed corresponds according to a second normalization function, and obtaining a second numerical value;
[0025] transferring the color value of the pixels of the image to be transformed in accordance Date Recue/Date Received 2022-03-17 with the saturation dimension according to the transfer vector and the second numerical value; and
[0026] obtaining a sum value of the transfer vector and the color value of the pixels of the image to be transformed, acquiring the remainder of the sum value divided by 2n, and transferring the color value of the pixels of the image to be transformed in accordance with the hue dimension according to a remainder-acquiring result, wherein it is the ratio of the circumference of a circle to its diameter.
[0027] In one of the embodiments, the image color transferring method further comprises:
[0028] employing a color quantization algorithm to sample the image to be transformed, and obtaining a plurality of quantized colors; and
[0029] taking the color with the highest probability of occurrence from the plurality of colors as the dominant color of the image to be transformed.
[0030] There is provided an image color transferring device that comprises:
[0031] an extracting module, for extracting a color value of a dominant color of an image to be transformed;
[0032] a determining module, for determining a transfer vector used in transferring a target color to the image to be transformed according to the color value of the dominant color of the image to be transformed and a color value of the target color; and
[0033] a transferring module, for transferring the target color to the image to be transformed according to the transfer vector.
[0034] There is provided a computer equipment that comprises a memory, a processor and a computer program stored on the memory and operable on the processor, and the method steps according to anyone of the aforementioned embodiments are realized when the processor executes the computer program.
[0035] There is provided a computer-readable storage medium storing a computer program Date Recue/Date Received 2022-03-17 thereon, and the method steps according to anyone of the aforementioned embodiments are realized when the computer program is executed by a processor.
[0036] In the aforementioned image color transferring method, corresponding device, computer equipment and storage medium, when the color value of the target color transferred to the image to be transformed is determined, the color value of the dominant color of the image to be transformed is extracted, a transfer vector for carrying out color transfer is determined according to the color value of the dominant color of the image to be transformed and the color value of the target color, and the transfer vector can be finally based on to transfer the target color to the image to be transformed.
Accordingly, color transfer of the image to be transformed is realizable without any target reference picture, and the restriction of the traditional color transfer technique in which reference picture is required is broken, so that the color transfer technique is made to satisfy many more application scenarios.
BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Fig. 1 is a view illustrating the application environment for an image color transferring method in an embodiment;
[0038] Fig. 2 is a flowchart schematically illustrating an image color transferring method in an embodiment;
[0039] Fig. 3 is a flowchart schematically illustrating step S200 in an embodiment;
[0040] Fig. 4 is a view illustrating interface image displays when two sets of different normalization functions are used to perform color transfer in an image color transferring method in an embodiment;
Date Recue/Date Received 2022-03-17
[0041] Fig. 5 is a view illustrating interface image displays in an image color transferring method in another embodiment;
[0042] Fig. 6 is a block diagram illustrating the structure of an image color transferring device in an embodiment; and
[0043] Fig. 7 is a view illustrating the internal structure of a computer equipment in an embodiment.
DETAILED DESCRIPTION OF THE INVENTION
[0044] To make more lucid and clear the objectives, technical solutions and advantages of the present application, the present application is described in greater detail below with reference to accompanying drawings and embodiments. As should be understood, the specific embodiments as described here are merely meant to explain the present application, rather than to restrict the present application.
[0045] The image color transferring method provided by the present application is applicable to the application environment as shown in Fig. 1, in which server 10 communicates with storage equipment 20 through network. Storage equipment 20 stores therein a plurality of images. Each image is set with color and images, and can further be set with corresponding words and digits, etc. Server 10 is employed to read images from storage equipment 20 and transfer colors on the images to obtain images that conform to requirements. Specifically, server 10 stores therein color values of a plurality of colors.
In response to a color transferring instruction as received, server 10 reads an image to be transformed from storage equipment 20 and determines a color value of a corresponding target color from internal memory. Moreover, use of the image color transferring method of the present application realizes transfer of the target color to the image to be transformed according to the color value of the target color, so as to obtain a target image Date Recue/Date Received 2022-03-17 that satisfies the color transferring instruction. In addition, server 10 communicates with terminal equipment group 40 through network. Generally, server 10 communicates with terminal equipment group 40 through cloud network 30, and dispatches the target image obtained after color transfer to various terminals of terminal equipment group 40. The various terminals of terminal equipment group 40 can be, but are not limited to be, various personal computers, notebook computers, smart mobile phones, panel computers and desktop computers, and server 10 can be embodied as an independent server or a server cluster consisting of a plurality of servers.
[0046] In one embodiment, as shown in Fig. 2, there is provided an image color transferring method, and the method is explained with an example of its being applied to the server in Fig. 1, to comprise the following steps.
[0047] S100 - extracting a color value of a dominant color of an image to be transformed.
[0048] In this embodiment, the backstage storage equipment stores therein a plurality of images for color transfer. In response to a color transferring instruction as received, the server obtains from the backstage storage equipment an image to be transformed. The image format of the image to be transformed is JPG, JPEG, TIFF, PNG, RAW or BMP etc.
In addition, the server further determines a target color to be transferred onto the image to be transformed according to the received color transferring instruction. The target color can be stored in the server or stored in the backstage storage equipment in the form of a color value, and can also be stored in the server or stored in the backstage storage equipment in the form of a color image.
[0049] Further, the server obtains the dominant color of the image to be transformed, and hence extracts the color value of this dominant color. The color value of the dominant color can be a hexadecimal color code, and can also be an RGB value, an HSV value, etc.

Date Recue/Date Received 2022-03-17
[0050] In one embodiment, the image color transferring method further comprises: employing a color quantization algorithm to sample the image to be transformed, and obtaining a plurality of quantized colors; and taking the color with the highest probability of occurrence from the plurality of colors as the dominant color of the image to be transformed.
[0051] Specifically, the server employs an OpenCV library (Open Source Computer Vision Library) to read the image to be transformed, and employs a color quantization algorithm to sample the image to be transformed, one color is obtained from each sampling, so that plural quantized colors are obtained; the color with the highest probability and maximum number of occurrence is taken from the plurality of colors obtained after sampling to serve as the dominant color of the image to be transformed. Specifically, the color quantization algorithm includes modified median cut quantization, K-means clustering method, octree method, frequency sequence method, and so on. In one mode of execution, the modified median cut quantization (MMCQ) is used as the color quantization algorithm to process the image to be transformed to obtain plural output colors, and selects the color with the highest probability of occurrence from the plural output colors to serve as the dominant color of the image to be transformed.
[0052] S200 - determining a transfer vector used in transferring a target color to the image to be transformed according to the color value of the dominant color of the image to be transformed and a color value of the target color.
[0053] In this embodiment, after having determined the target color, the server reads the color value of this target color. Further, the transfer vector when image color transfer is executed is determined according to the color value of the dominant color of the image to be transformed and the color value of the target color. The transfer vector is the moving vector to be referred when the target color is transferred to the image to be transformed.
The color value of the dominant color of the image to be transformed and the color value Date Recue/Date Received 2022-03-17 of the target color are corresponding color values within the same color space, so that the feasibility of obtaining the transfer vector is ensured.
[0054] In one embodiment, as shown in Fig. 3, step S200 includes:
[0055] S210 - obtaining a corresponding first three-dimensional color vector of the color value of the dominant color of the image to be transformed in a target color space;
[0056] S230 - obtaining a corresponding second three-dimensional color vector of the color value of the target color in the target color space; and
[0057] S250 - determining the transfer vector according to the first three-dimensional color vector and the second three-dimensional color vector.
[0058] In this embodiment, the server places the color value of the dominant color of the image to be transformed and the color value of the target color both in the same color space, and thereafter calculates to obtain the transfer vector. Specifically, the server determines the target color space. The target color space is a three-dimensional color space, in which the three dimensions are employed respectively to characterize the luminance channel, the saturation channel and the hue channel in the color. The target color space used in this embodiment is a CIE-LCH color model space, and it is of course also possible to use any other color space to perform transformation calculation of numerical values.
[0059] The server obtains a corresponding first three-dimensional color vector of the color value of the dominant color of the image to be transformed in the target color space and a corresponding second three-dimensional color vector of the color value of the target color in the target color space, and determines the transfer vector according to the first three-dimensional color vector and the second three-dimensional color vector in the target color space. The transfer vector here is also a corresponding three-dimensional vector in the target color space.
[0060] Specifically, the dominant color of the image to be transformed and the target color for Date Recue/Date Received 2022-03-17 color transfer are transformed to the CIE-LCH color model space. A third party library of python can be used for the transformation mode, and a corresponding function in a scikit-image image processing package is used to perform image processing. In addition, if there is a transparent channel in the image to be transformed, the transparent channel is drawn out before transformation is made, and the transparent channel is separately stored. Accordingly, the color value of the dominant color of the image to be transformed and the color value of the target color are processed under the CIE-LCH color model space to determine the transfer vector, in which process the property of the CIE-LCH
color model space that possesses interval uniformity with respect to responses to the same transformation is made use of to thereby make it possible to guarantee controllability of color transfer.
[0061] As for such color model spaces as HSV, HSL, and RGB etc. frequently used in the traditional digital image color processing, these color spaces differ relatively greatly in visual effects for the degrees of responses to the same transformation in the processing of differently colored pixels. Taking for example the HSV space, with respect to two pixels whose hues are respectively located in yellow and blue regions, when their saturations are likewise increased by 5, the visual perception of the yellow pixel changes abruptly, while the visual perception of the blue pixel does not change much.
Accordingly, when consistent color transformation is applied, changes in the visual perceptions of differently colored pixels are uncontrollable, so that the image generated is deprived of readability.
However, use of the CIE-LCH color model space in the embodiments of the present application solves quite well the problem concerning uncontrollability in the traditional color transfer.
[0062] In one embodiment, step S250 includes: obtaining a translation transformation vector used in translating the first three-dimensional color vector to the second three-dimensional color, and taking the translation transformation vector as the transfer vector.
Date Recue/Date Received 2022-03-17
[0063] In this embodiment, after the first three-dimensional color vector to which the color value of the dominant color of the image to be transformed corresponds and the second three-dimensional color vector to which the color value of the target color corresponds have been determined in the target color space, the first three-dimensional color vector is translated to the second three-dimensional color vector to obtain the translation transformation vector used in the translating process, and this translation transformation vector is taken as the transfer vector. Specifically, in the CIE-LCH color model space, the translation transformation vector is d1)*, then the calculation expression of the translation transformation vector is as follows:
stkh kb where '17.1' represents the second three-dimensional color vector, and icklai stkk represents the first three-dimensional color vector. is the translation transformation vector. Each dimension represents the distance of the corresponding dimension moving at the corresponding coordinate axis in the CIE-LCH color model space. The modulus of di stkb is the Euclidean distance between the second three-dimensional color vector and the first three-dimensional color vector under the CIE-LCH
color space.
[0064] Therefore, when the translation transformation vector used in translating the first three-dimensional color vector to the second three-dimensional color is taken to serve as the transfer vector, and the transfer vector is subsequently used to transfer the target color to the image to be transformed, the color contrast relation between different color regions is basically maintained, the color matching rule of the image to be transformed will not be damaged, and the image generated after such transfer is made more visually appealing.
[0065] S300 - transferring the target color to the image to be transformed according to the transfer vector.

Date Recue/Date Received 2022-03-17
[0066] In this embodiment, the server bases on the transfer vector to transfer the target color to the image to be transformed so as to realize image color transfer. In the specific mode of execution, it can be to move all color values of the image to be transformed according to the transfer vector, and the color exhibited in the image obtained after such movement is precisely the color effect after the target color has been transferred to the image to be transformed. It can also be to move partial color values of the image to be transformed according to the transfer vector, and the color exhibited in the image obtained after such movement is precisely the color effect after the target color has been transferred to the image to be transformed. Therefore, the restriction of the traditional color transfer technique in which reference picture is required is overcome.
[0067] In one embodiment, the transfer vector is a three-dimensional vector determined according to the first three-dimensional color vector to which the color value of the dominant color of the image to be transformed corresponds in the target color space and the second three-dimensional color vector to which the color value of the target color corresponds in the target color space. At this time, step S300 includes:
extracting a color value of pixels of the image to be transformed, transferring the color value of the pixels of the image to be transformed according to the transfer vector, and taking the image to be transformed after transferring as a target image, in which the target image is an image formed after the target color has been transferred to the image to be transformed.
[0068] Specifically, the color value of the pixels of the image to be transformed is extracted while color transfer is being performed, the color value of the pixels is transferred according to the transfer vector, and the color exhibited in the target image obtained after transferring is precisely the color exhibition result of the target color in the image to be transformed, so that it is realized to transfer the target color to the image to be transformed.
It is possible to transfer the color value of all pixels of the image to be transformed according to the transfer vector, and take the image to be transformed after transferring Date Recue/Date Received 2022-03-17 as a target image. It is also possible to transfer the color value of partial pixels of the image to be transformed according to the transfer vector, and take the image to be transformed after transferring as a target image.
[0069] In one embodiment, the step of transferring the color value of the pixels of the image to be transformed according to the transfer vector includes: transferring the color value of the pixels of the image to be transformed in accordance with a luminance dimension, a saturation dimension and a hue dimension, respectively, according to the transfer vector, in which the target color space includes the luminance dimension, the saturation dimension and the hue dimension.
[0070] Specifically, the target color space is a three-dimensional space, and the corresponding three dimensions in the three-dimensional space are, respectively, the luminance dimension, the saturation dimension and the hue dimension. In other words, the color value of the pixels of the image to be transformed is embodied in the target color space as the numerical values characterized by three dimension values, and the three dimension values respectively characterize the luminance, saturation and hue of the pixels. In addition, the transfer vector is a three-dimensional vector, and the three dimensions respectively characterize the corresponding luminance, saturation and hue of the color.
In the target color space, the color value of the pixels of the image to be transformed is transferred according to the transfer vector, and the image after transferring is precisely the image to be transformed to which the target color is transferred. It is possible during the color transferring process to transfer the color value of all pixels of the image to be transformed according to the transfer vector, and it is also possible to transfer the color value of partial pixels of the image to be transformed according to the transfer vector.
[0071] In one mode of execution in this embodiment, the step of transferring the color value of the pixels of the image to be transformed in accordance with a luminance dimension, a saturation dimension and a hue dimension, respectively, according to the transfer vector Date Recue/Date Received 2022-03-17 includes: normalizing the luminance data to which the luminance dimension in the color value of the pixels of the image to be transformed corresponds according to a first normalization function, and obtaining a first numerical value; transferring the color value of the pixels of the image to be transformed in accordance with the luminance dimension according to the transfer vector and the first numerical value; normalizing the saturation data to which the saturation dimension in the color value of the pixels of the image to be transformed corresponds according to a second normalization function, and obtaining a second numerical value; transferring the color value of the pixels of the image to be transformed in accordance with the saturation dimension according to the transfer vector and the second numerical value; and obtaining a sum value of the transfer vector and the color value of the pixels of the image to be transformed, acquiring the remainder of the sum value divided by 2n, and transferring the color value of the pixels of the image to be transformed in accordance with the hue dimension according to a remainder-acquiring result, wherein it is the ratio of the circumference of a circle to its diameter.
[0072] Specifically, the color value of all pixels of the image to be transformed is transferred according to the transfer vector. When the pixels of the image to be transformed are transferred in the target color space according to the transfer vector, the following expressions are abided by:
j[Lf = p,)[ ]-4-f1(põ)[L])*(li stk.õ[L]
pi.)[ [ ]-f-fjpia IC P*di stor Cl j[Iii = (pti[ H -.1ust,,,,,(E1) MOD2ff where i, j are respectively two-dimensional coordinates in the image, L
represents luminance dimension, C represents saturation dimension, and H represents hue dimension.
pLi[L]
represents the value of the image to be transformed on the luminance dimension, ki[C] represents the value of the image to be transformed on the saturation dimension, and represents the value of the image to be transformed on the hue dimension.

Date Recue/Date Received 2022-03-17 f ft(PLACP [1.1) represents the first normalization function, represents the second normalization function, and AVICO represents the remainder-acquiring disto[L]
operation.
represents the value of the transfer vector on the luminance stkk [C]
dimension represents the value of the transfer vector on the saturation dimension, and di st.k H I represents the value of the transfer vector on the hue dimension. PWIL] represents the value of the image to be transformed obtained after p.
luminance dimension transfer, represents the value of the image to be transformed obtained after saturation dimension transfer, and P Lj[
represents the value of the image to be transformed obtained after hue dimension transfer.
to. ,[L]-501 f IUD õ[LP¨tanill( ) +1
[0073] The first normalization functioa is: 27 [ CD
[0074] the second normalization function is:

fcl(pij[0])=-2( tarLh(IPL'r41 )+
pi, j[L]
where the domain of definition of and is [0,100], and the domain of f(p definition of ifis [0,27c]. The codornain of and is [0,1], fifspALP
and the codomain of Pajil is [0 27t]
f(r. [Lp
[0075] In addition, the first normalization function "
can further be:
(p. -[L]¨ 50)2 f j(p Lp =1 - _______________ 2500 õ and fc(Pif[CP
[0076] the second normalization function can further be:
Date Recue/Date Received 2022-03-17 f jr' ij[C]-551 anh ______________ ¨) 1-1)
[0077] Normalization functions are used in this embodiment to define the image to be transformed, so as to ensure as far as possible that the color value of the pixels still falls within the domain of definition even after transformation. In addition, the definitive normalization functions are continuous within the entire domain of definition, thusly guaranteeing that there is no tearing sensation to generate at various border regions of the image after color transfer, and strengthening readability.
[0078] Selection of the first normalization function and the second normalization function is variegated, and abides by the following constraint in the physical meaning.
[0079] As for the luminance channel, the codomain of the normalization function is [0,1], the axis is symmetrical in the domain of definition relevant to x=50, the function is monotonously increased when x<50, the function is monotonously decreased when x>50, and the maximum value 1 is obtained when x=50. This is so because black and white regions are usually not desired for participation in color transformation, such as black and white text formats. The transfer vector is weighted through the normalization functions to ensure that the black and white text formats in the original image essentially remain unchanged.
[0080] As for the saturation channel, the normalization function is monotonously increased in the domain of definition, and the codomain is [0,1]. Thusly, it is ensured that, when the saturation of the original color value is relatively low, the amplitude of change in its saturation should also be relatively low to prevent the color value from being imprecise after color transformation.
[0081] Two sets of different normalization functions are taken for example below, to have Date Recue/Date Received 2022-03-17 achieved different effects for the same input:
[0082] First set:
[L]-501 ) fipi4[2:1) . V=tanh( ______ +1 7 .
[0083] the first normalization function is:
f, [CI)
[0084] the second normalization function is:
________________________ ( t anh( IPiJ[CI-551) +1)
[0085] Second set:
(;) 50)2 LI) fs(pv[L94-
[0086] the first normalization function is:
f,(P,,,P1)
[0087] the second normalization function is:
f (?, 1[CD 1= ¨ (t ( [ C] -551 c '2 iv?
[0088] The results after performing color transfer by using the two sets of functions are as shown in Fig. 4. With reference to Fig. 4, after the color view 11 of the target color has been performed with color transfer by using the first set of functions, the new image obtained is image 22, after color transfer by using the second set of functions, the new image obtained is image 33. As can be known by a comparison of image 22 with image 33, after transferring of the target color, the image and text format in image 22 differ apparently from the image and text format in image 33 in terms of display effects.
[0089] In the picture generated by using the first set of functions, the contrast of the text format is slightly lowered, whereas in the picture generated by using the second set of functions, the contrast of the text format is clear, but color saturation and luminance are slightly lowered.

Date Recue/Date Received 2022-03-17
[0090] Selection of the normalization functions is subjective, the two sets of normalization functions given in the present application are considered through experimentation to be better ones in representation effect, as they respectively focus on bright and relatively solemn scenarios under the precondition of guaranteeing the basic effect of the picture as generated. As a matter of fact, any function that abides by the aforementioned constraining conditions is usable as a normalization function, but it will also affect the picture as generated in a different way.
[0091] In one embodiment, after step S300, the image color transferring method further comprises: transforming the image obtained after the target color has been transferred to the image to be transformed to an image of a corresponding target format.
[0092] Specifically, during the process of transferring the target color to the image to be transformed, it is required to transform the target color and the image to be transformed in the target color space to be processed there, and the image obtained after transferring is also an image under the target color space. Therefore, it is needed to transform the image obtained after transferring to an image of a target format corresponding to requirement, and to finally output the image of the target format. It is also possible to subject the image obtained after the target color has been transferred to the image to be transformed to image format transformation according to various requirements.
For instance, in the case the image to be transformed and the target color are both characterized under the RGB color space, after the two have been transformed in the CIE-LCH color model space to have been performed color transfer processing, the image obtained after transferring is transformed back again in the RGB color space, and the image under the RGB color space is finally output.
[0093] In the aforementioned image color transferring method, when the color value of the target color transferred to the image to be transformed is determined, the color value of the Date Recue/Date Received 2022-03-17 dominant color of the image to be transformed is extracted, a transfer vector for carrying out color transfer is determined according to the color value of the dominant color of the image to be transformed and the color value of the target color, and the transfer vector can be finally based on to transfer the target color to the image to be transformed.
Accordingly, color transfer of the image to be transformed is realizable without any target reference picture, and the restriction of the traditional color transfer technique in which reference picture is required is broken, so that the color transfer technique is made to satisfy many more application scenarios.
[0094] In order to better enunciate the image color transferring method of the aforementioned embodiment, a concrete embodiment is given below.
[0095] 1. The OpenCV library is employed to read a picture to be processed, namely the image to be transformed.
[0096] 2. The modified median cut quantization (MMCQ) method is employed to process the picture to be processed, 10 output colors are obtained, and the color with the highest probability of occurrence is selected as the dominant color of the picture to be processed.
[0097] 3. The dominant color as obtained and the target color needed for color transfer are transformed in the CIE-LCH color model space, a third party library of python can be employed, and corresponding functions in scikit-image are used to carry out image processing to obtain the color value of the dominant color and the color value of the target color. If there is a transparent channel in the picture to be processed, the transparent channel is drawn out before transformation is made, and the transparent channel is separately stored.
[0098] 4. The color value of the dominant color and the color value of the target color as obtained are made use of, and vector subtraction of a Numpy multi-dimensional array is employed Date Recue/Date Received 2022-03-17 to calculate the translation transformation vector from under the color value of the dominant color to the color value of the target color in the CIE-LCH color model space.
[0099] 5. Vector addition of the Numpy multi-dimensional array is employed to make corresponding transformation on each pixel in the picture to be processed according to the translation transformation vector to obtain a picture after transformation.
[0100] 6. The picture after transformation is transformed back from the CIE-LCH color model space to the RGB color space, the third party library of python can specifically be employed, and the corresponding functions in scikit-image are used to perform image processing. By the same token, if there is a transparent channel in the picture after transformation, a Numpy.concatenate function in the Numpy multi-dimensional array is used to obtain a target picture from the picture after transformation plus the transparent channel stored in step 3.
[0101] 7. The process is completed, and the target picture after transformation is output.
[0102] The implementation result of this mode of execution is as shown in Fig.
5, in which target color 44 is transferred to picture to be processed 55, and target picture 66 is finally obtained after transferring.
[0103] Accordingly, when there is new color matching requirement of an existing design picture, it is merely required according to the technical solution of the present application to input the existing template bitmap and the target color value designated as required, whereby a color-transferred picture can be obtained according to the original template in several seconds, and only manual check or slight adjustment is needed thereafter.
Repeated manual work of the designer is greatly reduced, moreover, only a PSD file (an image file format specific to Photoshop) is required to be maintained in the system before the required picture can be generated in real time after a color matching requirement has been Date Recue/Date Received 2022-03-17 received, and storage resource is greatly saved.
[0104] As should be understood, although the various steps in the flowcharts are sequentially displayed as indicated by arrows, these steps are not necessarily executed in the sequences indicated by arrows. Unless otherwise explicitly noted in this paper, execution of these steps is not restricted by any sequence, as these steps can also be executed in other sequences (than those indicated in the drawings). Moreover, at least partial steps in the flowcharts may include plural sub-steps or multi-phases, these sub-steps or phases are not necessarily completed at the same timing, but can be executed at different timings, and these sub-steps or phases are also not necessarily sequentially performed, but can be performed in turns or alternately with other steps or with at least some of sub-steps or phases of other steps.
[0105] In one embodiment, as shown in Fig. 6, there is provided an image color transferring device that comprises: an extracting module 100, a determining module 200 and a transferring module 300, of which:
[0106] the extracting module 100 is employed for extracting a color value of a dominant color of an image to be transformed;
[0107] the determining module 200 is employed for determining a transfer vector used in transferring a target color to the image to be transformed according to the color value of the dominant color of the image to be transformed and a color value of the target color;
and
[0108] the transferring module 300 is employed for transferring the target color to the image to be transformed according to the transfer vector.
[0109] In one of the embodiments, the determining module 200 can include (not shown in Fig.
6):
[0110] a first obtaining unit, for obtaining a corresponding first three-dimensional color vector of the color value of the dominant color of the image to be transformed in a target color Date Recue/Date Received 2022-03-17 space;
[0111] a second obtaining unit, for obtaining a corresponding second three-dimensional color vector of the color value of the target color in the target color space; and
[0112] a determining unit, for determining the transfer vector according to the first three-dimensional color vector and the second three-dimensional color vector.
[0113] In one of the embodiments, the determining unit can include:
[0114] a determining subunit, for obtaining a translation transformation vector used in translating the first three-dimensional color vector to the second three-dimensional color, and taking the translation transformation vector as the transfer vector.
[0115] In one of the embodiments, the transferring module 300 can include (not shown in Fig.
6):
[0116] an extracting unit, for extracting a color value of pixels of the image to be transformed;
and
[0117] a transferring unit, for transferring the color value of the pixels of the image to be transformed according to the transfer vector, and taking the image to be transformed after transferring as a target image;
[0118] the target image is an image formed after the target color has been transferred to the image to be transformed.
[0119] In one of the embodiments, the transferring unit further includes:
[0120] a transferring subunit, for transferring the color value of the pixels of the image to be transformed in accordance with a luminance dimension, a saturation dimension and a hue dimension, respectively, in the target color space according to the transfer vector.
[0121] In one of the embodiments, the transferring subunit further includes (not shown in Fig.
6):
[0122] a first processing unit, for normalizing the luminance data to which the luminance Date Recue/Date Received 2022-03-17 dimension in the color value of the pixels of the image to be transformed corresponds according to a first normalization function, and obtaining a first numerical value;
transferring the color value of the pixels of the image to be transformed in accordance with the luminance dimension according to the transfer vector and the first numerical value;
[0123] a second processing unit, for normalizing the saturation data to which the saturation dimension in the color value of the pixels of the image to be transformed corresponds according to a second normalization function, and obtaining a second numerical value;
transferring the color value of the pixels of the image to be transformed in accordance with the saturation dimension according to the transfer vector and the second numerical value; and
[0124] a third processing unit, for obtaining a sum value of the transfer vector and the color value of the pixels of the image to be transformed, acquiring the remainder of the sum value divided by 2n, and transferring the color value of the pixels of the image to be transformed in accordance with the hue dimension according to a remainder-acquiring result, wherein it is the ratio of the circumference of a circle to its diameter.
[0125] In one of the embodiments, the image color transferring device further comprises (not shown in Fig. 6):
[0126] a segmenting module, for employing a color quantization algorithm to sample the image to be transformed, and obtaining a plurality of quantized colors; and taking the color with the highest probability of occurrence from the plurality of colors as the dominant color of the image to be transformed.
[0127] Specific definitions relevant to the image color transferring device may be inferred from the aforementioned definitions to the image color transferring method, while no repetition is made in this context. The various modules in the aforementioned image color transferring device can be wholly or partly realized via software, hardware, and a combination of software with hardware. The various modules can be embedded in the Date Recue/Date Received 2022-03-17 form of hardware in a processor in a computer equipment or independent of any computer equipment, and can also be stored in the form of software in a memory in a computer equipment, so as to facilitate the processor to invoke and perform operations corresponding to the aforementioned various modules.
[0128] In one embodiment, a computer equipment is provided, the computer equipment can be an image processing server, and its internal structure can be as shown in Fig.
7. The computer equipment comprises a processor, a memory, a network interface and a database connected to each other via a system bus. The processor of the computer equipment is employed to provide computing and controlling capabilities. The memory of the computer equipment includes a nonvolatile storage medium, and an internal memory. The nonvolatile storage medium stores therein an operating system, a computer program and a database. The internal memory provides environment for the running of the operating system and the computer program in the nonvolatile storage medium. The database of the computer equipment is employed to store such data as color values of target colors, etc. The network interface of the computer equipment is employed to connect to an external terminal via network for communication. The computer program realizes an image color transferring method when it is executed by a processor.
[0129] As understandable to persons skilled in the art, the structure illustrated in Fig. 7 is merely a block diagram of partial structure relevant to the solution of the present application, and does not constitute any restriction to the computer equipment on which the solution of the present application is applied, as the specific computer equipment may comprise component parts that are more than or less than those illustrated in Fig. 7, or may combine certain component parts, or may have different layout of component parts.
[0130] In one embodiment, there is provided a computer equipment that comprises a memory, a processor and a computer program stored on the memory and operable on the processor, and the following steps are realized when the processor executes the computer program:

Date Recue/Date Received 2022-03-17
[0131] extracting a color value of a dominant color of an image to be transformed; determining a transfer vector used in transferring a target color to the image to be transformed according to the color value of the dominant color of the image to be transformed and a color value of the target color; and transferring the target color to the image to be transformed according to the transfer vector.
[0132] In one embodiment, when the processor executes the computer program to realize the step of determining a transfer vector used in transferring a target color to the image to be transformed according to the color value of the dominant color of the image to be transformed and a color value of the target color, the following steps are further realized:
[0133] obtaining a corresponding first three-dimensional color vector of the color value of the dominant color of the image to be transformed in a target color space;
obtaining a corresponding second three-dimensional color vector of the color value of the target color in the target color space; and determining the transfer vector according to the first three-dimensional color vector and the second three-dimensional color vector.
[0134] In one embodiment, when the processor executes the computer program to realize the step of determining the transfer vector according to the first three-dimensional color vector and the second three-dimensional color vector, the following steps are further realized:
[0135] obtaining a translation transformation vector used in translating the first three-dimensional color vector to the second three-dimensional color, and taking the translation transformation vector as the transfer vector.
[0136] In one embodiment, when the processor executes the computer program to realize the step of transferring the target color to the image to be transformed according to the transfer vector, the following steps are further realized:
[0137] extracting a color value of pixels of the image to be transformed; and transferring the color value of the pixels of the image to be transformed according to the transfer vector, Date Recue/Date Received 2022-03-17 and taking the image to be transformed after transferring as a target image;
the target image is an image formed after the target color has been transferred to the image to be transformed.
[0138] In one embodiment, when the processor executes the computer program to realize the step of transferring the color value of the pixels of the image to be transformed according to the transfer vector, the following step is further realized:
[0139] transferring the color value of the pixels of the image to be transformed in accordance with a luminance dimension, a saturation dimension and a hue dimension, respectively, in the target color space according to the transfer vector.
[0140] In one embodiment, when the processor executes the computer program to realize the step of transferring the color value of the pixels of the image to be transformed in accordance with a luminance dimension, a saturation dimension and a hue dimension, respectively, in the target color space according to the transfer vector, the following steps are further realized:
[0141] normalizing the luminance data to which the luminance dimension in the color value of the pixels of the image to be transformed corresponds according to a first normalization function, and obtaining a first numerical value; transferring the color value of the pixels of the image to be transformed in accordance with the luminance dimension according to the transfer vector and the first numerical value; normalizing the saturation data to which the saturation dimension in the color value of the pixels of the image to be transformed corresponds according to a second normalization function, and obtaining a second numerical value; transferring the color value of the pixels of the image to be transformed in accordance with the saturation dimension according to the transfer vector and the second numerical value; and obtaining a sum value of the transfer vector and the color value of the pixels of the image to be transformed, acquiring the remainder of the sum value divided by 2n, and transferring the color value of the pixels of the image to be transformed in accordance with the hue dimension according to a remainder-acquiring Date Recue/Date Received 2022-03-17 result, wherein it is the ratio of the circumference of a circle to its diameter.
[0142] In one embodiment, when the processor executes the computer program, the following steps are further realized:
[0143] employing a color quantization algorithm to sample the image to be transformed, and obtaining a plurality of quantized colors; and taking the color with the highest probability of occurrence from the plurality of colors as the dominant color of the image to be transformed.
[0144] In one embodiment, there is provided a computer-readable storage medium storing thereon a computer program, and the following steps are realized when the computer program is executed by a processor:
[0145] extracting a color value of a dominant color of an image to be transformed; determining a transfer vector used in transferring a target color to the image to be transformed according to the color value of the dominant color of the image to be transformed and a color value of the target color; and transferring the target color to the image to be transformed according to the transfer vector.
[0146] In one embodiment, when the computer program is executed by a processor to realize the step of determining a transfer vector used in transferring a target color to the image to be transformed according to the color value of the dominant color of the image to be transformed and a color value of the target color, the following steps are further realized:
[0147] obtaining a corresponding first three-dimensional color vector of the color value of the dominant color of the image to be transformed in a target color space;
obtaining a corresponding second three-dimensional color vector of the color value of the target color in the target color space; and determining the transfer vector according to the first three-dimensional color vector and the second three-dimensional color vector.
[0148] In one embodiment, when the computer program is executed by a processor to realize the Date Recue/Date Received 2022-03-17 step of determining the transfer vector according to the first three-dimensional color vector and the second three-dimensional color vector, the following steps are further realized:
[0149] obtaining a translation transformation vector used in translating the first three-dimensional color vector to the second three-dimensional color, and taking the translation transformation vector as the transfer vector.
[0150] In one embodiment, when the computer program is executed by a processor to realize the step of transferring the target color to the image to be transformed according to the transfer vector, the following steps are further realized:
[0151] extracting a color value of pixels of the image to be transformed; and transferring the color value of the pixels of the image to be transformed according to the transfer vector, and taking the image to be transformed after transferring as a target image;
the target image is an image formed after the target color has been transferred to the image to be transformed.
[0152] In one embodiment, when the computer program is executed by a processor to realize the step of transferring the color value of the pixels of the image to be transformed according to the transfer vector, the following step is further realized:
[0153] transferring the color value of the pixels of the image to be transformed in accordance with a luminance dimension, a saturation dimension and a hue dimension, respectively, in the target color space according to the transfer vector.
[0154] In one embodiment, when the computer program is executed by a processor to realize the step of transferring the color value of the pixels of the image to be transformed in accordance with a luminance dimension, a saturation dimension and a hue dimension, respectively, in the target color space according to the transfer vector, the following steps are further realized:
[0155] normalizing the luminance data to which the luminance dimension in the color value of Date Recue/Date Received 2022-03-17 the pixels of the image to be transformed corresponds according to a first normalization function, and obtaining a first numerical value; transferring the color value of the pixels of the image to be transformed in accordance with the luminance dimension according to the transfer vector and the first numerical value; normalizing the saturation data to which the saturation dimension in the color value of the pixels of the image to be transformed corresponds according to a second normalization function, and obtaining a second numerical value; transferring the color value of the pixels of the image to be transformed in accordance with the saturation dimension according to the transfer vector and the second numerical value; and obtaining a sum value of the transfer vector and the color value of the pixels of the image to be transformed, acquiring the remainder of the sum value divided by 2n, and transferring the color value of the pixels of the image to be transformed in accordance with the hue dimension according to a remainder-acquiring result, wherein it is the ratio of the circumference of a circle to its diameter.
[0156] In one embodiment, when the computer program is executed by a processor, the following steps are further realized:
[0157] employing a color quantization algorithm to sample the image to be transformed, and obtaining a plurality of quantized colors; and taking the color with the highest probability of occurrence from the plurality of colors as the dominant color of the image to be transformed.
[0158] As comprehensible to persons ordinarily skilled in the art, the entire or partial flows in the methods according to the aforementioned embodiments can be completed via a computer program instructing relevant hardware, the computer program can be stored in a nonvolatile computer-readable storage medium, and the computer program can include the flows as embodied in the aforementioned various methods when executed. Any reference to the memory, storage, database or other media used in the various embodiments provided by the present application can all include nonvolatile and/or volatile memory/memories. The nonvolatile memory can include a read-only memory Date Recue/Date Received 2022-03-17 (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable and programmable ROM (EEPROM) or a flash memory. The volatile memory can include a random access memory (RAM) or an external cache memory. To serve as explanation rather than restriction, the RAM is obtainable in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM
(SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct Rambus dynamic RAM (DRDRAM), and Rambus dynamic RAM
(RDRAM), etc.
[0159] Technical features of the aforementioned embodiments are randomly combinable, while all possible combinations of the technical features in the aforementioned embodiments are not exhausted for the sake of brevity, but all these should be considered to fall within the scope recorded in the Description as long as such combinations of the technical features are not mutually contradictory.
[0160] The foregoing embodiments are merely directed to several modes of execution of the present application, and their descriptions are relatively specific and detailed, but they should not be hence misunderstood as restrictions to the inventive patent scope. As should be pointed out, persons with ordinary skill in the art may further make various modifications and improvements without departing from the conception of the present application, and all these should pertain to the protection scope of the present application.
Accordingly, the patent protection scope of the present application shall be based on the attached Claims.
Date Recue/Date Received 2022-03-17

Claims (25)

What is claimed is:
1. An image color transferring method, the method comprising:
extracting a color value of a dominant color of an image to be transformed by employing a color quantization algorithm to sample the image to be transformed, and obtaining a plurality of quantized colors, wherein each quantized color is associated with a probability of occurrence;
taking the color associated with the highest probability of occurrence from the plurality of colors as the dominant color of the image to be transformed;
obtaining a corresponding first three-dimensional color vector of the color value of the dominant color of the image to be transformed in a target color space;
obtaining a corresponding second three-dimensional color vector of the color value of the target color in the target color space;
determining the transfer vector according to the first three-dimensional color vector and the second three-dimensional color vector;
extracting a color value of pixels of the image to be transformed; and transferring the color value of the pixels of the image to be transformed according to the transfer vector, and taking the image to be transformed after transferring as a target image; wherein the target image is an image formed after the target color has been transferred to the image to be transformed.
2. The method of claim 1, wherein determining the transfer vector according to the first three-dimensional color vector and the second three-dimensional color vector comprises:
obtaining a translation transformation vector used in translating the first three-dimensional Date Recue/Date Received 2023-06-19 color vector to the second three-dimensional color, and taking the translation transformation vector as the transfer vector.
3. The method of claim 2, wherein transferring the color value of the pixels of the image to be transformed according to the transfer vector comprises:
transferring the color value of the pixels of the image to be transformed in accordance with a luminance dimension, a saturation dimension and a hue dimension, respectively, in the target color space according to the transfer vector.
4. The method of claim 3, wherein transfening the color value of the pixels of the image to be transformed in accordance with a luminance dimension, a saturation dimension and a hue dimension, respectively, in the target color space according to the transfer vector comprises:
normalizing the luminance data to which the luminance dimension in the color value of the pixels of the image to be transformed corresponds according to a first normalization function, and obtaining a first numerical value;
transferring the color value of the pixels of the image to be transformed in accordance with the luminance dimension according to the transfer vector and the first numerical value;
normalizing the saturation data to which the saturation dimension in the color value of the pixels of the image to be transformed corresponds according to a second normalization function, and obtaining a second numerical value;
transferring the color value of the pixels of the image to be transformed in accordance with the saturation dimension according to the transfer vector and the second numerical value;
and Date Recue/Date Received 2023-06-19 obtaining a sum value of the transfer vector and the color value of the pixels of the image to be transformed, acquiring the remainder of the sum value divided by 21r, and transferring the color value of the pixels of the image to be transformed in accordance with the hue dimension according to a remainder-acquiring result, wherein rr is the ratio of the circumference of a circle to its diameter.
5. An image color transferring device, the device comprising:
an extracting module configured to:
extract a color value of a dominant color of an image to be transformed by employing a color quantization algorithm to sample the image to be transformed, and obtaining a plurality of quantized colors, wherein each quantized color is associated with a probability of occurrence;
take the color associated with the highest probability of occurrence from the plurality of colors as the dominant color of the image to be transformed;
a determining module configured to:
obtain a corresponding first three-dimensional color vector of the color value of the dominant color of the image to be transformed in a target color space;
obtain a corresponding second three-dimensional color vector of the color value of the target color in the target color space;
determine the transfer vector according to the first three-dimensional color vector and the second three-dimensional color vector a transferring module configured to:
extract a color value of pixels of the image to be transformed; and transfer the color value of the pixels of the image to be transformed according to the transfer vector, and taking the image to be transformed after transferring as a target image; wherein Date Recue/Date Received 2023-06-19 the target image is an image formed after the target color has been transferred to the image to be transformed.
6. The device of claim 5, wherein the device further comprises a a determining subunit configured to obtain a translation transformation vector used in translating the first three-dimensional color vector to the second three-dimensional color, and taking the translation transformation vector as the transfer vector.
7. The device of any one of claims 5 to 6, wherein the transferring module further comprises:
a transferring subunit configured to transfer the color value of the pixels of the image to be transformed in accordance with a luminance dimension, a saturation dimension and a hue dimension, respectively, in the target color space according to the transfer vector.
8. The device of claim 7, wherein the transferring subunit further comprises:
a first processing unit configured to nomialize the luminance data to which the luminance dimension in the color value of the pixels of the image to be transformed corresponds according to a first normalization function, and obtaining a first numerical value; transferring the color value of the pixels of the image to be transformed in accordance with the luminance dimension according to the transfer vector and the first numerical value;
a second processing unit configured to normalize the saturation data to which the saturation Date Recue/Date Received 2023-06-19 dimension in the color value of the pixels of the image to be transformed corresponds according to a second normalization function, and obtaining a second numerical value;
transferring the color value of the pixels of the image to be transformed in accordance with the saturation dimension according to the transfer vector and the second numerical value; and a third processing unit configured to obtain a sum value of the transfer vector and the color value of the pixels of the image to be transformed, acquiring the remainder of the sum value divided by 23E, and transferring the color value of the pixels of the image to be transformed in accordance with the hue dimension according to a remainder-acquiring result, wherein 7E
is the ratio of the circumference of a circle to its diameter.
9. The device of any one of claims 5 to 8, further comprising:
a segmenting module configured to employ a color quantization algorithm to sample the image to be transformed, and obtaining a plurality of quantized colors, wherein each quantized color is associated with a probability of occurrence; and taking the color with the highest associated probability of occurrence from the plurality of colors as the dominant color of the image to be transformed.
10. An image transferring computer system, comprising:
a shared memory; and a processor comprising:
a first obtaining unit configured to obtain a corresponding first three-dimensional color vector of the color value of the dominant color of the image to be transformed in a target color space;
a second obtaining unit configured to obtain a corresponding second three-dimensional color vector of the color value of the target color in the target color space;
a determining unit, for determining the transfer vector according to the first three-dimensional color vector and the second three-dimensional color vector;
an extracting unit, for extracting a color value of pixels of the image to be transformed; and Date Recue/Date Received 2023-06-19 a transferring unit, for transferring the color value of the pixels of the image to be transformed according to the transfer vector, and taking the image to be transformed after transferring as a target image, wherein the target image is an image formed after the target color has been transferred to the image to be transformed.
11. The system of claim 10, wherein detemiining the transfer vector according to the first three-dimensional color vector and the second three-dimensional color vector comprises:
obtaining a translation transformation vector used in translating the first three-dimensional color vector to the second three-dimensional color, and taking the translation transformation vector as the transfer vector.
12. The system of claim 11, wherein transferring the color value of the pixels of the image to be transformed according to the transfer vector comprises:
transferring the color value of the pixels of the image to be transformed in accordance with a luminance dimension, a saturation dimension and a hue dimension, respectively, in the target color space according to the transfer vector.
13. The system of claim 12, wherein transferring the color value of the pixels of the image to be transformed in accordance with a luminance dimension, a saturation dimension and a hue dimension, respectively, in the target color space according to the transfer vector comprises:
normalizing the luminance data to which the luminance dimension in the color value of the pixels of the image to be transformed corresponds according to a first normalization function, and obtaining a first numerical value.
14. The system of claim 12, wherein transferring the color value of the pixels of the image to be transformed in accordance with a luminance dimension, a saturation dimension and a hue Date Recue/Date Received 2023-06-19 dimension, respectively, in the target color space according to the transfer vector comprises:
transferring the color value of the pixels of the image to be transformed in accordance with the luminance dimension according to the transfer vector and the first numerical value.
15. The system of claim 12, wherein transferring the color value of the pixels of the image to be transformed in accordance with a luminance dimension, a saturation dimension and a hue dimension, respectively, in the target color space according to the transfer vector comprises:
normalizing the saturation data to which the saturation dimension in the color value of the pixels of the image to be transformed corresponds according to a second normalization function, and obtaining a second numerical value.
16. The system of claim 12, wherein transferring the color value of the pixels of the image to be transformed in accordance with a luminance dimension, a saturation dimension and a hue dimension, respectively, in the target color space according to the transfer vector comprises:
transferring the color value of the pixels of the image to be transformed in accordance with the saturation dimension according to the transfer vector and the second numerical value.
17. The system of claim 12, wherein transferring the color value of the pixels of the image to be transformed in accordance with a luminance dimension, a saturation dimension and a hue dimension, respectively, in the target color space according to the transfer vector comprises:
obtaining a sum value of the transfer vector and the color value of the pixels of the image to be transformed, acquiring the remainder of the sum value divided by 27E, and transferring the color value of the pixels of the image to be transformed in accordance with the hue dimension according to a remainder-acquiring result, wherein 7r is the ratio of the circumference of a circle to its diameter.
18. A computer-readable storage medium storing a computer executable instructions thereon when executed by a computer, the computer is configured to:

Date Recue/Date Received 2023-06-19 extract a color value of a dominant color of an image to be transformed by employing a color quantization algorithm to sample the image to be transforined, and obtaining a plurality of quantized colors, wherein each quantized color is associated with a probability of occurrence;
take the color associated with the highest probability of occurrence from the plurality of colors as the dominant color of the image to be transformed;
obtain a corresponding first three-dimensional color vector of the color value of the dominant color of the image to be transformed in a target color space;
obtain a corresponding second three-dimensional color vector of the color value of the target color in the target color space;
determine the transfer vector according to the first three-dimensional color vector and the second three-dimensional color vector;
extract a color value of pixels of the image to be transformed; and transfer the color value of the pixels of the image to be transformed according to the transfer vector, and taking the image to be transformed after transferring as a target image; wherein the target image is an image formed after the target color has been transferred to the image to be transformed.
19. The computer-readable storage medium of claim 18, wherein determining the transfer vector according to the first three-dimensional color vector and the second three-dimensional color vector comprises:
obtain a translation transformation vector used in translating the first three-dimensional color vector to the second three-dimensional color, and taking the translation transformation vector as the transfer vector.
20. The computer-readable storage medium of claim 19, wherein transferring the color value of the pixels of the image to be transformed according to the transfer vector comprises:
transfer the color value of the pixels of the image to be transformed in accordance with a luminance dimension, a saturation dimension and a hue dimension, respectively, in the target color space according to the transfer vector.

Date Recue/Date Received 2023-06-19
21. The computer-readable storage medium of claim 19, wherein transferring the color value of the pixels of the image to be transfoinied in accordance with a luminance dimension, a saturation dimension and a hue dimension, respectively, in the target color space according to the transfer vector comprises:
normalize the luminance data to which the luminance dimension in the color value of the pixels of the image to be transformed corresponds according to a first noimalization function, and obtaining a first numerical value.
22. The computer-readable storage medium of claim 19, wherein transferring the color value of the pixels of the image to be transfonned in accordance with a luminance dimension, a saturation dimension and a hue dimension, respectively, in the target color space according to the transfer vector comprises:
transfer the color value of the pixels of the image to be transformed in accordance with the luminance dimension according to the transfer vector and the first numerical value.
23. The computer-readable storage medium of claim 19, wherein transferring the color value of the pixels of the image to be transformed in accordance with a luminance dimension, a saturation dimension and a hue dimension, respectively, in the target color space according to the transfer vector comprises:
normalizing the saturation data to which the saturation dimension in the color value of the pixels of the image to be transformed corresponds according to a second normalization function, and obtaining a second numerical value.
24. The computer-readable storage medium of claim 19, wherein transferring the color value of the pixels of the image to be transformed in accordance with a luminance dimension, a saturation dimension and a hue dimension, respectively, in the target color space according to the transfer vector comprises:

Date Recue/Date Received 2023-06-19 transferring the color value of the pixels of the image to be transformed in accordance with the saturation dimension according to the transfer vector and the second numerical value.
25. The computer-readable storage medium of claim 19, wherein transferring the color value of the pixels of the image to be transformed in accordance with a luminance dimension, a saturation dimension and a hue dimension, respectively, in the target color space according to the transfer vector comprises:
obtain a sum value of the transfer vector and the color value of the pixels of the image to be transformed, acquiring the remainder of the sum value divided by 27r, and transferring the color value of the pixels of the image to be transformed in accordance with the hue dimension according to a remainder-acquiring result, wherein 7E is the ratio of the circumference of a circle to its diameter.
Date Recue/Date Received 2023-06-19
CA3154893A 2019-09-18 2020-07-30 Image color transferring method, device, computer equipment and storage medium Active CA3154893C (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN201910880382.4 2019-09-18
CN201910880382.4A CN110728722B (en) 2019-09-18 2019-09-18 Image color migration method and device, computer equipment and storage medium
PCT/CN2020/105933 WO2021052028A1 (en) 2019-09-18 2020-07-30 Image color migration method, apparatus, computer device and storage medium

Publications (2)

Publication Number Publication Date
CA3154893A1 CA3154893A1 (en) 2021-03-25
CA3154893C true CA3154893C (en) 2023-10-03

Family

ID=69219208

Family Applications (1)

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

Country Status (3)

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

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110728722B (en) * 2019-09-18 2022-08-02 苏宁云计算有限公司 Image color migration method and device, computer equipment and storage medium
CN111461996B (en) * 2020-03-06 2023-08-29 合肥师范学院 Quick intelligent color matching method for image
CN111612702B (en) * 2020-04-07 2023-04-21 杭州电子科技大学 Neutral color correction post-treatment method for color migration
CN112365457A (en) * 2020-10-29 2021-02-12 浙江大学 Color migration method based on carpet color matching adaptive space
CN114565506B (en) * 2022-01-17 2023-04-18 北京新氧科技有限公司 Image color migration method, device, equipment and storage medium
CN114863095B (en) * 2022-03-25 2023-11-28 电子科技大学 Answer sheet image segmentation method based on color conversion

Family Cites Families (11)

* 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 (en) * 2012-09-27 2017-08-25 中国电信股份有限公司 Image color retrieval method and system
CN103198464B (en) * 2013-04-09 2015-08-12 北京航空航天大学 A kind of migration of the face video shadow based on single reference video generation method
US20160086377A1 (en) * 2014-09-19 2016-03-24 Qualcomm Incorporated Determining an image target's suitability for color transfer in an augmented reality environment
CN105261046B (en) * 2015-09-23 2018-01-19 北京航空航天大学 A kind of tone moving method of scene adaptive
CN105761283B (en) * 2016-02-14 2018-12-25 广州神马移动信息科技有限公司 A kind of picture key color extraction method and device
US10049297B1 (en) * 2017-03-20 2018-08-14 Beihang University Data driven method for transferring indoor scene layout and color style
CN107464213B (en) * 2017-08-03 2019-11-08 浙江大学 The heavy color method of Lab space mapping based on monochromatic colour disk
CN109300169B (en) * 2018-09-06 2023-04-07 华东师范大学 Semitransparent image color migration method based on linear transformation
CN109636712B (en) * 2018-12-07 2022-03-01 北京达佳互联信息技术有限公司 Image style migration and data storage method and device and electronic equipment
CN110728722B (en) * 2019-09-18 2022-08-02 苏宁云计算有限公司 Image color migration method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN110728722B (en) 2022-08-02
CA3154893A1 (en) 2021-03-25
CN110728722A (en) 2020-01-24
WO2021052028A1 (en) 2021-03-25

Similar Documents

Publication Publication Date Title
CA3154893C (en) Image color transferring method, device, computer equipment and storage medium
US11373275B2 (en) Method for generating high-resolution picture, computer device, and storage medium
US11037335B2 (en) Deep learning based virtual hair dyeing method and method for providing virtual hair dyeing service using the same
CN109472839B (en) Image generation method and device, computer equipment and computer storage medium
CN113034358B (en) Super-resolution image processing method and related device
CN112991180B (en) Image stitching method, device, equipment and storage medium
CN113379775A (en) Generating a colorized image based on interactive color edges using a colorized neural network
CN107622504B (en) Method and device for processing pictures
WO2019101005A1 (en) Pixel compensation method and apparatus, and terminal device
CN103440674A (en) Method for rapidly generating crayon special effect of digital image
US20230047748A1 (en) Method of fusing image, and method of training image fusion model
US20200410718A1 (en) Method and apparatus for determining text color
CN110880164B (en) Image processing method, device, equipment and computer storage medium
CN113923474A (en) Video frame processing method and device, electronic equipment and storage medium
CN115984856A (en) Training method of document image correction model and document image correction method
US20170337657A1 (en) Merging filters for a graphic processing unit
WO2021213222A1 (en) Method and apparatus for processing reading content, computer device and storage medium
CN110942488B (en) Image processing device, image processing system, image processing method, and recording medium
WO2023207454A1 (en) Image processing method, image processing apparatuses and readable storage medium
WO2023005743A1 (en) Image processing method and apparatus, computer device, storage medium, and computer program product
WO2022247702A1 (en) Image processing method and apparatus, electronic device, and storage medium
US20240212239A1 (en) Logo Labeling Method and Device, Update Method and System of Logo Detection Model, and Storage Medium
JP2015125543A (en) Line-of-sight prediction system, line-of-sight prediction method, and line-of-sight prediction program
CN116977154B (en) Visible light image and infrared image fusion storage method, device, equipment and medium
US20230385980A1 (en) Generating content adaptive watermarks for digital images

Legal Events

Date Code Title Description
EEER Examination request

Effective date: 20220317

EEER Examination request

Effective date: 20220317

EEER Examination request

Effective date: 20220317

EEER Examination request

Effective date: 20220317

EEER Examination request

Effective date: 20220317

EEER Examination request

Effective date: 20220317

EEER Examination request

Effective date: 20220317

EEER Examination request

Effective date: 20220317

EEER Examination request

Effective date: 20220317

EEER Examination request

Effective date: 20220317