An image processing method and apparatus, device, medium

CN117974813BActive Publication Date: 2026-06-19BEIJING DONGCHEZU TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING DONGCHEZU TECHNOLOGY CO LTD
Filing Date
2024-02-05
Publication Date
2026-06-19

Smart Images

  • Figure CN117974813B_ABST
    Figure CN117974813B_ABST
Patent Text Reader

Abstract

This disclosure provides an image processing method, apparatus, device, and medium. The method includes adjusting the original color parameters of a target region of an original image based on target color configuration parameters to obtain initial color parameters of the target region; determining candidate color parameters of the target region in multiple candidate color intervals based on the initial color parameters of the target region; adjusting the original color of the target region based on the candidate color parameters of the target region in each candidate color interval to obtain candidate images corresponding to the multiple candidate color intervals; and obtaining a target image from the candidate images corresponding to the multiple candidate color intervals. The method can ensure that the generated target image meets the color replacement requirements and is less prone to detail modification problems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image processing technology, and in particular to an image processing method, apparatus, device, and medium. Background Technology

[0002] With the development of image technology, people are increasingly using image processing techniques to process raw images in order to obtain the desired target image. For example, the raw image can be processed according to the color requirements of the target object to ensure that the color of the target object in the raw image meets the color requirements of the target object.

[0003] Taking car paint color changing as an example, generative models can be used to change the color of car paint in car images. However, the color changing accuracy is not high, which makes it difficult to meet users' needs for car paint color changing in car images. In addition, problems with the details of the car body are easy to occur, resulting in the generated target image not meeting the requirements. Summary of the Invention

[0004] According to one aspect of this disclosure, an image processing method is provided, comprising:

[0005] The original color parameters of the target region in the original image are adjusted based on the target color configuration parameters to obtain the initial color parameters of the target region.

[0006] Based on the initial color parameters of the target region, determine the candidate color parameters of the target region in multiple candidate color intervals;

[0007] Based on the candidate color parameters of the target region in each candidate color interval, the original color of the target region is adjusted to obtain candidate images corresponding to multiple candidate color intervals;

[0008] A target image is obtained from candidate images corresponding to multiple candidate color ranges, wherein the target image includes candidate images that meet the target color filtering conditions from the candidate images corresponding to multiple candidate color ranges.

[0009] According to another aspect of this disclosure, an image processing apparatus is provided, comprising:

[0010] The generation module is used to adjust the original color parameters of the target region of the original image based on the target color configuration parameters to obtain the initial color parameters of the target region, determine the candidate color parameters of the target region in multiple candidate color intervals based on the initial color parameters of the target region, and adjust the original color of the target region based on the candidate color parameters of the target region in each candidate color interval to obtain candidate images corresponding to multiple candidate color intervals.

[0011] The filtering module is used to obtain a target image from candidate images corresponding to multiple candidate color ranges, wherein the target image includes candidate images that meet the target color filtering conditions among the multiple candidate images corresponding to the multiple candidate color ranges.

[0012] According to another aspect of this disclosure, an electronic device is provided, comprising:

[0013] Processor; and,

[0014] Memory for stored programs;

[0015] The program includes instructions that, when executed by the processor, cause the processor to perform the method according to an exemplary embodiment of the present disclosure.

[0016] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided, the non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method according to exemplary embodiments of this disclosure.

[0017] One or more technical solutions provided in the exemplary embodiments of this disclosure can adjust the original color parameters of the target region of the original image based on the target color configuration parameters to obtain the initial color parameters of the target region. Then, based on the initial color parameters of the target region, candidate color parameters of the target region in multiple candidate color intervals are determined. This actually maps the initial color parameters of the target region to different candidate color intervals, and refines the initial color parameters in different candidate color intervals into candidate color parameters of the target region in multiple candidate color intervals. In this case, the original color of the target region is adjusted based on the candidate color parameters of the target region in multiple candidate color intervals to obtain candidate images corresponding to multiple candidate color intervals. Assuming that the original color of the target region is adjusted using the initial color parameters of the target region to obtain the initial image, the candidate image corresponding to each candidate color interval can be regarded as a migration image of the initial image in different candidate color intervals. The target region color parameters of such candidate images are more refined than the target region color parameters of the initial image. Therefore, when obtaining candidate images that meet the target color filtering conditions from the candidate images corresponding to multiple candidate color intervals, the target region color of the target image determined by the candidate images that meet the target color filtering conditions is closer to the target color requirement of the target region than the target region color of the initial image. As can be seen, the method of the exemplary embodiments of this disclosure processes the original image and can ensure the accuracy of color replacement in the target area of ​​the original image.

[0018] Furthermore, the exemplary embodiments of this disclosure can adjust the original color of the target region based on the candidate color parameters of the target region in the corresponding candidate color interval to obtain a candidate image corresponding to each candidate color interval. Therefore, the target image obtained from the candidate images corresponding to multiple candidate color intervals can retain the details of the non-target regions of the target image to the greatest extent, ensuring that the generated target image meets the requirements. Taking car paint color changing as an example, changing the color of the car paint in a car image can not only ensure the accuracy of the car paint color changing, but also fully retain the detailed features of the car body, meeting the user's requirements for the car color changing effect image. Attached Figure Description

[0019] Further details, features, and advantages of this disclosure are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:

[0020] Figure 1 A schematic flowchart of an image processing method according to an exemplary embodiment of the present disclosure is shown;

[0021] Figure 2 A schematic diagram illustrating the process of determining color migration parameters for candidate color ranges in an exemplary embodiment of this disclosure is shown.

[0022] Figure 3 This illustration shows a schematic diagram of the process for determining candidate color parameters for a target region in multiple candidate color ranges, as exemplified in this disclosure.

[0023] Figure 4 A schematic diagram showing the distribution of light source positions according to an exemplary embodiment of the present disclosure is provided.

[0024] Figure 5 A schematic block diagram of an image processing apparatus according to an exemplary embodiment of the present disclosure is shown;

[0025] Figure 6 A schematic block diagram of a chip according to an exemplary embodiment of the present disclosure is shown;

[0026] Figure 7 A structural block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation

[0027] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0028] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0029] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc., used in this disclosure are only used to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.

[0030] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0031] With the development of image technology, people are increasingly using image processing techniques to process raw images in order to obtain the desired target image. For example, the raw image can be processed according to the color requirements of the target object to ensure that the color of the target object in the raw image meets the color requirements of the target object.

[0032] Taking the automotive industry as an example, generative models can be used to recolor car paint in images, providing users with a variety of car appearance effects to meet their personalized needs. However, current generative models do not have high accuracy in recoloring car paint in images, resulting in significant differences between the recolored paint and the ideal color. Furthermore, inaccurate or missing details of the car body are prone to occur.

[0033] In response to the above text, an exemplary embodiment of this disclosure provides an image processing method that can perform precise local color replacement of the original image of various targets while preserving the detailed features of the targets as much as possible and reducing the loss of detailed features of the targets.

[0034] In practical applications, the original image of the target object in the exemplary embodiments of this disclosure can be the paint color change of vehicles such as cars, motorcycles, bicycles, airplanes, ships and other land, sea and air transportation vehicles, or the color change of various daily necessities and outer packaging as required.

[0035] The image processing method of this exemplary embodiment can be executed by an electronic device or a chip applied in an electronic device. The electronic device can be a user terminal or a cloud server, depending on the actual application scenario. For example, the image processing method of this exemplary embodiment can be deployed on a user terminal, either as a plug-in embedded in an existing application or as a standalone application. As another example, the image processing method of this exemplary embodiment can be deployed on a cloud server, which, upon receiving an original image uploaded by an application on a user terminal, performs image processing on the original image and then returns the target image to the application on the user terminal.

[0036] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0037] For example, the original image of the target object can be an original image of the target object that is authorized or licensed for use on the internet. Alternatively, when capturing the original image of the target object, authorization or permission from the legal owner of the target object is required, and the captured original image of the target object also requires authorization or permission from the legal owner of the target object. Another example: when the image processing method of this exemplary embodiment is embedded into a user terminal as a plug-in, it should be embedded into the application with the permission of that application.

[0038] Figure 1 A flowchart illustrating an exemplary embodiment of the image processing method of this disclosure is shown. Figure 1 As shown, the image processing method of an exemplary embodiment of this disclosure may include:

[0039] Step 101: Adjust the original color parameters of the target region of the original image based on the target color configuration parameters to obtain the initial color parameters of the target region. It should be understood that the target region of the original image in the exemplary embodiments of this disclosure may refer to a local region of the target object included in the original image. For example, when the original image is a car image, the target region may be the car paint area in the car image.

[0040] In practical applications, exemplary embodiments of this disclosure can first use a target region mask of the original image to obtain the target region of the original image, and then use target color configuration parameters to adjust the original color parameters of the target region to obtain the initial color parameters of the target region.

[0041] For example, the target color configuration parameters mentioned above may include a color offset parameter determined by a reference color parameter and a target color parameter, wherein the reference color parameter of the target area may be determined by the original color of the target object in the target area from the reference color parameter of the target area.

[0042] The aforementioned target color parameter can be any specific color parameter, and the reference color parameter can be a representative color parameter in the target area. This representative color parameter can be predicted by a network model, or it can be a weighted sum of one or several original color parameters in the target area that can represent the original color of the target area. The original color parameter of the target area can be considered as a set of multiple original color parameters in the target area. Therefore, the reference color parameter in the exemplary embodiment of this disclosure is not the same as the original color parameter of the target area.

[0043] For example, when the initial color parameters of the target region include the initial color parameters of multiple reference positions located within the target region, the initial color parameter of each reference position is determined by the target color configuration parameters and the original color parameters of the corresponding reference position. Here, the reference positions can refer to all pixel positions within the target region, or they can be multiple pixel positions extracted from all pixels in the target region.

[0044] In an exemplary embodiment of this disclosure, the initial color parameters of the target area include initial color parameters of multiple reference positions located in the target area, wherein the initial color parameters of each reference position are determined by the target color configuration parameters and the original color information of the corresponding reference position.

[0045] Taking the car paint area as an example, the pixel color that can represent the color of the car paint can be obtained from the car paint area as a reference color parameter. Then, based on the reference color parameter and the target color parameter, the color offset parameter is determined. Next, the original color parameter of the target area is adjusted using the color offset parameter. This process is actually adjusting the original color parameter of the target area to be closer to the target color parameter, ensuring that the initial color parameter of the target area is close to the target color parameter.

[0046] In practical applications, considering that the initial color parameters of the target region may differ significantly from the target color parameters, the exemplary embodiments of this disclosure can refine the initial color parameters, then use the refined expression results to generate multiple candidate images, and finally obtain the candidate image that meets the target color selection conditions from the multiple candidate images, and output it as the target image, thereby ensuring that the target region color of the obtained target image is closer to the target color requirement of the target region, thereby improving the color replacement accuracy of the target region, reducing the color difference of the target region, and achieving the purpose of improving the quality of the color-replaced image.

[0047] Step 102: Determine the candidate color parameters of the target region in multiple candidate color intervals based on the initial color parameters of the target region. This actually maps the initial color parameters of the target region to different candidate color intervals, refining the initial color parameters in different candidate color intervals into candidate color parameters of the target region in multiple candidate color intervals, thereby achieving the purpose of splitting the initial color parameters of the target region.

[0048] In practical applications, when determining the candidate color parameters of a target region in multiple candidate color intervals, the exemplary embodiments of this disclosure can determine the initial color interval of the target region based on the initial color parameters of the target region, and then determine the candidate color parameters of the target region in multiple candidate color intervals based on the initial color interval of the target region, the initial color parameters of the target region, and multiple candidate color intervals.

[0049] For example, considering that the initial color parameters of the target area include the initial color parameters of multiple reference positions in the target area, the lower limit value and the upper limit value of the initial color parameters of the target area can be obtained from the initial color parameters of multiple reference positions, and the interval formed by the color parameters within the range of the lower limit value and the upper limit value of the initial color parameters is used as the initial color interval.

[0050] For example, considering the wide range of colors represented by a color space, the color space can be divided into multiple candidate color intervals, which belong to the same color interval. Each candidate color interval has different color parameters. For instance, we can first obtain the upper and lower limits of the color parameters in the color space. Then, within the color parameter interval formed by the lower and upper limits, we can divide it into multiple sub-color parameter intervals, each corresponding to a candidate color interval.

[0051] To transfer the initial color parameters to different candidate color intervals for more detailed expression, the color transfer parameters of the target region can be determined based on the initial color interval and initial color parameters of the target region. Then, based on the color transfer parameters of the target region and multiple candidate color intervals, the candidate color parameters of the target region in multiple candidate color intervals can be determined.

[0052] For example, when the initial color parameters of the target area include the initial color parameters of multiple reference positions located in the target area, the candidate color parameters of the target area in multiple candidate color intervals may include the candidate color parameters of multiple reference positions in each candidate color interval.

[0053] When the color migration parameters of the target region are defined as the degree of fluctuation of the initial color of multiple reference positions relative to the target limit color of the initial color interval (hereinafter referred to as the degree of fluctuation of the color parameters of the reference positions), the degree of fluctuation of the color parameters of multiple reference positions can reflect the relative position of the initial color parameters of the reference positions within the same color interval. Therefore, by using the color migration parameters of the target region and each candidate color interval, the candidate color parameters of the target region in each candidate color interval can be determined, thereby realizing a detailed expression of the initial color parameters in the candidate color interval.

[0054] The exemplary embodiments disclosed herein do not simply classify and filter the initial color parameters of all pixels in the target region according to the candidate color intervals, but rather map the initial color parameters of all pixels in the target region to different candidate color intervals. This not only achieves a fine division of the initial color parameters, but also ensures that the initial color parameters of all pixels in the target region are expressed in the candidate color interval of each candidate color interval.

[0055] Step 103: Adjust the original color of the target region based on the candidate color parameters of the target region in multiple candidate color intervals to obtain candidate images corresponding to multiple candidate color intervals.

[0056] In practical applications, the candidate image corresponding to each candidate color interval is determined by the weighted value of the candidate color parameters of the target region in the corresponding candidate color interval and the original image. Here, the weighted value of the candidate color parameters of the target region in the corresponding candidate color interval is equal to the target region mask of the original image, while the weighted value of the original image is equal to the non-target region mask of the original image.

[0057] Taking car paint color changing as an example, with the car paint area as the target area and the non-painted areas as non-target areas, a car paint area mask and a non-painted area mask can be obtained from the original image beforehand. Then, using the non-painted area mask as a weighting value for the car image, the non-painted areas are extracted from the car image. Finally, the non-painted areas are superimposed on the candidate color parameters of the car paint area (which has been weighted by the car paint area mask) within the corresponding candidate color range, thus obtaining a candidate image corresponding to that candidate color range. For example, refer to I. res =I mask ·I pro +(1-Imask)×I, determine the candidate images, where I res I represents the candidate image, and I represents the original image. mask Indicates a mask for the paint area of ​​a car, I pro This represents a set of multiple candidate color parameters corresponding to a candidate color range.

[0058] As can be seen, the exemplary embodiments of this disclosure can use a mask-weighted summation method to introduce the candidate color parameters of the target region in the corresponding candidate color interval into the original image, reconstruct the color of the target region in the original image, and obtain the candidate image corresponding to the candidate color interval. Moreover, reconstructing the original image using the mask-weighted method will not lose the details of the original image, and can ensure that the obtained target image is basically the same or completely identical to the original image except for the color of the target region.

[0059] Assuming that the original color of the target region is adjusted using the initial color parameters of the target region to obtain an initial image, the candidate image corresponding to each candidate color interval can be regarded as a migration image of the initial image in different candidate color intervals. The target region color parameters of such candidate images are more refined than the target region color parameters of the initial image. Therefore, when obtaining candidate images corresponding to multiple candidate color intervals in the exemplary embodiment of this disclosure, it can be regarded as a secondary division of the initial color interval, so as to derive multiple candidate images with smaller color intervals from the initial image.

[0060] Step 104: Obtain the target image from the candidate images corresponding to multiple candidate color ranges. The target image includes candidate images that meet the target color filtering conditions from the candidate images corresponding to multiple candidate color ranges.

[0061] Referring to the preceding text, the process of obtaining candidate images corresponding to multiple candidate color ranges in the exemplary embodiments of this disclosure can be regarded as deriving multiple candidate images with smaller color ranges from the initial image. Each candidate image can be regarded as an expression of the initial image within a smaller color range. Therefore, when obtaining candidate images that meet the target color selection conditions from candidate images corresponding to multiple candidate color ranges, it can be ensured that the target region color parameters of the candidate images selected by the candidate are closer to the target color parameters. Using them as the target image can ensure the accuracy of color replacement in the target region of the original image and improve the color replacement quality.

[0062] As one possible implementation, the various color parameters involved in the exemplary embodiments of this disclosure, such as reference color parameters, target color parameters, and original color parameters, can all be correlated in the same target color space to achieve the purpose of image processing. However, considering that the human eye perceives different brightness levels of red, green, and blue colors when performing correlation techniques in the RGB color space, the obtained target image is prone to significant visual shift if correlation calculations are performed directly in the RGB color space.

[0063] To overcome the aforementioned problems, when the reference color parameters, target color parameters, and original color parameters of the target region in the exemplary embodiments of this disclosure are all represented in RGB form, the reference color parameters, target color parameters, and original color parameters can be converted to a target color space that is more sensitive to human color perception, such as the HSV color space, HLS color space, or even the Lab color space. Then, the color offset parameters of the reference color parameters and target color parameters in the target color space are obtained. Finally, the original color of the target region in the target color space is modified using the color offset parameters in the target color space to obtain the initial color parameters of the target region.

[0064] Suppose that the color parameters of a pixel in the RGB color space can be represented as {R, G, B}, where R represents the color value of the red channel, G represents the color value of the green channel, and B represents the color value of the blue channel. The color parameters of this pixel in the HSV color space can be represented as hue (H), saturation (S), and value (V). The following example demonstrates how to convert from RGB to HSV color space.

[0065] The method for converting pixel color from RGB color space to HSV color space in an exemplary embodiment of this disclosure may include:

[0066] The first step is to determine the relative color value R' of the red channel, the relative color value G' of the green channel, and the relative color value B' of the blue channel based on the pixel's color parameters in the RGB color space. For example, the relative color value R' of the red channel can be obtained by R' = R / 255, the relative color value G' of the green channel can be obtained by G' = G / 255, and the relative color value G' of the blue channel can be obtained by B' = B / 255.

[0067] The second step is to obtain the maximum value C from the relative color value R' of the red channel, the relative color value G' of the green channel, and the relative color value B' of the blue channel. max and minimum value C min .

[0068] Third step, if the maximum value C max and minimum value C min The difference Δ is equal to 0°. The pixel hue H is determined to be 0°; otherwise, the color channel attribute of the maximum value is checked. If the maximum value's color channel attribute is red, the pixel hue is determined based on the relative color value G' of the green channel, the relative color value B' of the blue channel, and the difference Δ between the maximum and minimum values. If the color channel attribute of the maximum value is the green channel, then the pixel hue is determined based on the relative color value R' of the red channel, the relative color value B' of the blue channel, and the difference Δ between the maximum and minimum values. If the color channel attribute of the maximum value is the blue channel, then the pixel hue is determined based on the relative color value R' of the red channel, the relative color value G' of the green channel, and the difference Δ between the maximum and minimum values.

[0069] Step 4: If the maximum value is 0, determine that the pixel saturation S is 0; if the maximum value is not 0, it can be based on the maximum value C. max and minimum value C min The difference Δ, and the maximum value C max Determine the saturation H = Δ / C max .

[0070] Assume the reference color parameter can be represented as {h} in the HSV color space. src ,s src ,v src The target color parameter in the HSV color space can be represented as {h}. tag ,s tag ,v tag}, where h src The hue of the reference color, s src Indicates the saturation of the reference color, v src h represents the lightness or darkness of the reference color. tag The hue of the target color, s tag V represents the saturation of the target color. tag This represents the lightness of the target color parameter in the HSV color space. In this case, the color offset parameter actually includes the hue difference, saturation difference, and lightness difference of the reference color parameter in the HSV color space. For example, it can be expressed as Δ. i =i tag -i src Let i = h, s, v be used to solve for the color offset parameter Δ i Among them, the color offset parameter Δ i Including hue difference Δ h Saturation difference Δ s and the difference in brightness Δ v When i = h, the phase difference Δ can be solved. h When i = v, the brightness difference Δ can be calculated. s .

[0071] When the color offset parameter Δ is obtained i Then, the color offset parameter Δ can be used. iThe original color parameters of the target area are adjusted to obtain its initial color parameters. The original color parameters of the target area in the HSV color space can include the original hue, original saturation, and original brightness of each pixel in the target area. Therefore, the original color parameters of the target area can be considered as the original color parameter I. i It can include the original hue set I h Original saturation set I s and the original brightness set I v .

[0072] The original hue of each pixel in the target region can form an original hue set I. h The original saturation of each pixel in the target region can form an original saturation set I. s The original brightness of each pixel in the target area can form an original brightness set I. v Then you can refer to I' i =I i +Δ i i = h, s, v, using the hue difference Δ h For the original hue set I h Original saturation set I s and the original brightness set I v Adjust them separately to obtain the initial color parameter I' of the target area. i That is, the initial hue set I' h Initial saturation set I' s and the initial brightness set I' v .

[0073] As can be seen, in the exemplary embodiment of this disclosure, after adjusting the original color parameters of the target region of the original image based on the target color configuration parameters, the initial color parameters of the target region obtained are actually the initial color parameters of a series of pixels included in the target region. However, since the original color parameters of some pixels included in the target region may differ, the initial color parameters of some pixels included in the initial color parameters of the target region, based on the target color configuration parameters, may also differ, even exceeding the color parameter limits in the color space. This results in the inability to obtain a target image that meets the target color requirements when directly adjusting the original color of the target region of the original image using the initial color parameters of the target region, or in cases where the colors of individual pixels cannot be adjusted.

[0074] To address the aforementioned issues, this exemplary embodiment of the present disclosure can determine candidate color parameters for the target region in multiple candidate color intervals based on the initial color parameters of the target region. By expressing the initial color parameters of the target region in different candidate color intervals, the difference in candidate color parameters for the target region within each interval is minimized, thereby increasing the number of images corresponding to the initial color parameters of the target region from one to multiple images corresponding to multiple candidate color intervals. Based on this, when obtaining candidate images that meet the target color selection criteria from the candidate images corresponding to multiple candidate color intervals, the resulting target images exhibit smaller color differences in the target region, more closely approximating the user's target color requirements, thus improving the accuracy of color replacement in the target region.

[0075] As one possible implementation, when the initial color parameters of the target region are expressed in different candidate color intervals in the exemplary embodiments of this disclosure, a linear transformation can be used to map the initial color parameters of the target region to multiple candidate color intervals. The parameters used in this linear transformation can be the color migration parameters described above.

[0076] When the initial color parameters of the target region include the initial color parameters of multiple reference positions located within the target region, Figure 2 A schematic diagram illustrating the process for determining color migration parameters for candidate color ranges in an exemplary embodiment of this disclosure is shown. Figure 2 As shown in the exemplary embodiment of this disclosure, determining the color migration parameters of the target region based on the initial color range and initial color parameters of the target region may include:

[0077] Step 201: Based on the initial color parameters of each reference position and the target limit color parameters of the initial color range, determine the relative initial color parameters of each reference position. This actually involves performing a difference operation between the initial color parameters of each reference position and the target limit color parameters of the initial color range to obtain the relative initial color parameters of each reference position, which can reflect the position of the initial color parameters in the entire color space.

[0078] The initial color range of the exemplary embodiments of this disclosure can be the color range corresponding to the initial color parameters of multiple reference positions included in the target area, and the target limit color parameter of the initial color range can include the upper limit value of the initial color parameters of multiple reference positions, that is, the upper limit value of the initial color parameter of the target area can also be the lower limit value of the initial color parameter of multiple reference positions, that is, the lower limit value of the initial color parameter of the target area.

[0079] Step 202: Determine the color migration parameters of the target region based on the extreme color parameter changes of the initial color interval and the relative initial color parameters of each reference position. If the extreme color parameter changes of the initial color interval are considered as the difference between the upper limit and lower limit values ​​of the initial color parameters of multiple reference positions, the color migration parameters of the target region can be negatively correlated with the extreme color parameter changes of the initial color interval and positively correlated with the relative initial color parameters of the reference positions.

[0080] For example, when the target limiting color parameter of this exemplary embodiment is the upper limit value of the initial color parameters of a plurality of reference positions, it can be adopted Determine the color migration parameter λ for the target region. When the target limiting color parameter of the initial color interval is the lower limit value of the initial color parameter at multiple reference positions, it can be used... Determine the color migration parameter λ for the target region. Here, 'a' represents the lower limit of the initial color parameter at multiple reference locations, and 'b' represents the upper limit of the initial color parameter at multiple reference locations.

[0081] As can be seen, the color migration parameter λ of the target area determined by the above two methods in the exemplary embodiments of this disclosure can essentially include color migration parameters of multiple reference positions. That is, the color migration parameter of each reference position can refer to the degree of fluctuation of the initial color of each reference position relative to the target limit color of the initial color range.

[0082] As one possible implementation, an exemplary embodiment of this disclosure can use the color migration parameter of the target region as a coefficient to determine the candidate color parameter of the target region in multiple candidate color intervals. Figure 3 This illustration shows a schematic diagram of the process for determining candidate color parameters for a target region across multiple candidate color ranges, as per an exemplary embodiment of this disclosure. Figure 3 As shown, an exemplary embodiment of this disclosure determines candidate color parameters of a target region within multiple candidate color intervals based on color migration parameters of the target region and multiple candidate color intervals, including:

[0083] Step 301: Based on the extreme color parameter changes of each candidate color interval and the fluctuation of the initial color parameters of multiple reference positions in the initial color interval, determine the relative candidate color parameters of multiple reference positions in each candidate color interval.

[0084] For each candidate color interval, the limiting color parameter of the candidate color interval can include the upper limit value and the lower limit value of the candidate color parameter of the target region. The change in the limiting color parameter of the candidate color interval can be determined based on the upper limit value and the lower limit value of the candidate color parameter of the target region. Here, the upper limit value of the candidate color parameter of the target region can be the upper limit value of the candidate color parameter at multiple reference positions within the target region, and the lower limit value of the candidate color parameter of the target region can be the difference between the lower limits of the candidate color parameter at multiple reference positions within the target region. Since the color migration parameter of the target region includes the degree of fluctuation of the initial color of multiple reference positions relative to the target limiting color of the initial color interval, the relative candidate color parameter of multiple reference positions in each candidate color interval can be determined based on the change in the limiting color parameter of each candidate color interval and the degree of fluctuation of the initial color parameter of multiple reference positions within the initial color interval. This can represent the position of multiple reference positions in each candidate color interval.

[0085] Step 302: Based on the relative candidate color parameters of multiple reference positions in multiple candidate color intervals and the target limit color parameters of multiple candidate color intervals, determine the candidate color parameters of the target region in multiple candidate color intervals.

[0086] In practical applications, the target limiting color parameters of the exemplary embodiments of this disclosure are different, and the degree of fluctuation of the initial color parameters of the reference position relative to the target limiting color parameters of the initial color range also differs from the relationship between the target region and the candidate color parameters of multiple candidate color ranges.

[0087] For example, when the target limiting color parameter of this exemplary embodiment is the upper limit of the initial color range, the greater the fluctuation of the initial color parameter at each reference position relative to the target limiting color parameter of the initial color range, the smaller the candidate color parameter of the target region in multiple candidate color ranges. For example, it can be adopted that... Determine the candidate color parameters for the target region in multiple candidate color ranges.

[0088] When the target limiting color parameter is the lower limit of the initial color interval, the greater the fluctuation of the initial color parameter at each reference position relative to the target limiting color parameter of the initial color interval, the larger the candidate color parameter of the target region in multiple candidate color intervals. For example, it can be used... Determine the candidate color parameters for the target region in multiple candidate color intervals, where c represents the lower limit of the candidate color parameters for multiple reference positions, and d represents the upper limit of the candidate color parameters for multiple reference positions.

[0089] Considering that when the target color is color, hue differences will bring serious color differences to the final target image, if the target color of the target area is color, the candidate brightness parameter range and candidate saturation parameter range are different for different candidate color intervals, while the saturation parameter range and brightness parameter range are the same.

[0090] For example, in the HSV color space, the saturation and lightness ranges are both [43, 255] for different candidate color ranges, while the hue range is different. Based on this, when the target color is a color, the hue range, saturation range, and lightness range of the HSV color space can be obtained. Then, the hue range can be divided into multiple sub-hue ranges (such as 9 sub-ranges). Then, based on each sub-hue range, saturation range, and lightness range, the corresponding candidate color range can be determined.

[0091] As can be seen, in the exemplary embodiment of this disclosure, when obtaining candidate color ranges, only the hue range is divided, without dividing the saturation and lightness ranges. Therefore, the candidate hue ranges of different candidate color ranges are different, but the candidate saturation and lightness ranges of different candidate color ranges are the same, and are the same as the initial saturation and lightness ranges included in the initial color parameters. In other words, it can be achieved through... Figure 2 and Figure 3 The relevant description maps the initial hue of the target area to multiple candidate color ranges, without needing to map the initial saturation and initial brightness of the target area to multiple candidate color ranges.

[0092] Considering that the target color is grayscale, i.e., black, white and gray, these colors do not have the concept of hue, or the hue is 0°. Therefore, if the target color is grayscale, the range of candidate brightness parameters and candidate saturation parameters for different candidate color intervals are different, while the candidate hue parameters for different candidate color intervals are the same by default.

[0093] For example, in the HSV color space, when the target color is a grayscale color, the target color does not have a hue concept. However, because the saturation and brightness ranges of black, white, and gray are quite extensive, and the colors corresponding to different saturation and brightness ranges show significant differences in display, we can obtain the saturation and brightness ranges of the HSV color space. Then, we can divide the saturation range into m sub-hue ranges (e.g., 3 sub-hue ranges) and the brightness range into n sub-brightness ranges (e.g., 3 sub-ranges). Based on these m sub-saturation and n sub-brightness ranges, we can determine m×n candidate color ranges, where the candidate hue of these candidate color ranges is assumed to be 0°, or no candidate hue exists. In other words, we can... Figure 2 and Figure 3The relevant description maps the initial saturation and initial brightness of the target area to multiple candidate color ranges, without needing to map the initial hue of the target area to multiple candidate color ranges.

[0094] As one possible implementation, considering that the candidate color range of the target region color parameter in the candidate image of the exemplary embodiment of this disclosure is relatively small, the candidate image may have insufficient gloss or loss of gloss. To further improve the quality of the target image, the exemplary embodiment of this disclosure can adjust the gloss of the candidate image corresponding to each candidate color range.

[0095] There are many ways to adjust glossiness, such as: performing lighting processing on the candidate image to simulate the brightness and darkness changes of the target area included in the candidate image under lighting conditions; or performing brightness stretching on the target area of ​​each candidate image to increase the brightness and darkness changes between pixels with brightness differences within the target area included in the candidate image, thereby improving the contrast of the candidate image.

[0096] In one alternative approach, when lighting the candidate image, a relevant lighting algorithm can be used to simulate the light source of a real scene. The position of the light source can be designed according to the actual situation, for example, it can be based on... Figure 4 The light source position configuration shown illustrates the light source coordinates for designing a lighting algorithm. Among these, Figure 4 The sun symbol shown represents a light source, which can be set as follows: upper left light source 401, upper middle light source 402, upper right light source 403, lower left light source 404, lower middle light source 405, and lower right light source 406.

[0097] We can assume that the coordinates of the light source in the candidate image are represented by (x... s ,y s The width of the candidate image represents the illumination radius R of the light source. Let the light intensity of the light source be S, and let S be the coordinates (x, y) of the light source in the candidate image. s ,y s This involves illuminating pixels within the candidate image that are located within the illumination radius R of the light source. It should be understood that when the candidate image uses the HSV color space, the color space of the candidate image can be converted from HSV to RGB before the illuminating process is performed.

[0098] For example, we can calculate the Euclidean distance from each pixel in a candidate image to the light source. If a certain pixel (x... r ,y k The corresponding Euclidean distance d s If the light source radius R is less than or equal to the light source radius R, the RGB color value p based on that pixel can be processed using the lighting function f(p).r ,y k The corresponding Euclidean distance d s If the light source radius R is greater than the light radius of the light source, then the RGB color value p of that pixel will not be processed, or the lighting function f(p) = p can be set directly.

[0099] The aforementioned pixel (x) r ,y r The corresponding Euclidean distance d ks It can be represented as The lighting function f(p) can be expressed as follows:

[0100]

[0101] Considering that the closer an object is to a light source in a real environment, the brighter its surface becomes. Therefore, the greater the Euclidean distance between a pixel located within the light source's illumination radius R and the light source, the higher the brightness of the pixel's RGB color value p after processing by the lighting function. This ensures that the candidate image processed by the lighting function f(p) can present a more natural lighting effect.

[0102] In one alternative approach, when performing brightness stretching on the target region of each candidate image, the candidate image can be processed using brightness stretching to improve its contrast. It should be understood that when the candidate image's color space is HSV, the color space of the candidate image can be first converted from HSV to RGB before brightness stretching is performed.

[0103] For example, a lower limit value a' and an upper limit value b' of brightness can be set, and then the pixel brightness values ​​of the target area can be processed by the brightness stretching function g(v), so that the pixels with higher brightness in the target area are brighter, and the pixels with lower brightness are brighter, thereby improving the contrast of the candidate image.

[0104] For example, the brightness stretching function g(v) can be expressed as: Here, v represents the pixel brightness within the target area. The brightness of each pixel v within the target area can be determined. If the brightness of a pixel is less than or equal to the lower brightness limit a', the pixel brightness value can be directly modified to 0. If the brightness of a pixel is greater than the lower brightness limit a' but less than the upper brightness limit b', the pixel brightness can be set to 0. If the brightness of a certain pixel is greater than or equal to the upper limit value b', the pixel brightness can be set to 255.

[0105] Taking the scenario of changing the color of car paint as an example, by using the brightness stretching function g(v) to change the color of the car paint in the car image, it can be found that the lower limit value a' is equivalent to the standard for judging whether the brightness of the pixels in the car paint color change is low. That is, the brightness of pixels less than or equal to the lower limit value a' is reduced to the extreme. On the other hand, the upper limit value b' is equivalent to the standard for judging whether the brightness of the pixels in the car paint color change is high. That is, the brightness of pixels greater than or equal to the lower limit value a' is increased to the extreme. This ensures that the brighter pixels in the target area are brighter and the darker pixels are darker, thus improving the contrast of the car image after the car paint color change, i.e., the candidate image.

[0106] As one possible implementation, when obtaining candidate images that meet the target color filtering conditions from candidate images corresponding to multiple candidate color ranges in an exemplary embodiment of this disclosure, the target color filtering conditions may refer to the similarity between the target region color parameters of the candidate image and the target color parameters being greater than a preset similarity.

[0107] For example, a color recognition model can first identify the color parameters of the target region in a candidate image, then compare the similarity with the target color parameters, and select the candidate image corresponding to the target region color parameters with the highest similarity as the target image. Taking a solid-color car paint repainting scenario as an example, the car image after paint repainting can be input into a color recognition model to obtain multiple color probabilities, such as 13 color probabilities categorized as brown, orange, dark gray, white, purple, etc., with the highest probability color being the car paint color. Then, the color parameters of the car paint color are compared with the target color parameters to obtain the similarity between the paint color of the repainted car image and the target color.

[0108] Alternatively, candidate images and target color maps can be directly input into a color recognition model to obtain the color probability of the target region and the target color probability of the candidate image. Based on the difference between the color probabilities of the target region and the target color probability, the similarity between the color parameters of the target region and the target color parameters of the candidate image can be determined. Taking the scenario of changing the color of a solid-color car paint as an example, the difference between the color probability of the target region and the target color probability corresponding to different candidate images can be statistically analyzed, and the candidate image with the largest difference can be determined as the target image.

[0109] One or more technical solutions provided in the exemplary embodiments of this disclosure can adjust the original color parameters of the target region of the original image based on the target color configuration parameters to obtain the initial color parameters of the target region. Then, based on the initial color parameters of the target region, candidate color parameters of the target region in multiple candidate color intervals are determined. This actually maps the initial color parameters of the target region to different candidate color intervals, and refines the initial color parameters in different candidate color intervals into candidate color parameters of the target region in multiple candidate color intervals. In this case, the original color of the target region is adjusted based on the candidate color parameters of the target region in multiple candidate color intervals to obtain candidate images corresponding to multiple candidate color intervals. Assuming that the original color of the target region is adjusted using the initial color parameters of the target region to obtain the initial image, the candidate image corresponding to each candidate color interval can be regarded as a migration image of the initial image in different candidate color intervals. The target region color parameters of such candidate images are more refined than the target region color parameters of the initial image. Therefore, when obtaining candidate images that meet the target color filtering conditions from the candidate images corresponding to multiple candidate color intervals, the target region color of the target image determined by the candidate images that meet the target color filtering conditions is closer to the target color requirement of the target region than the target region color of the initial image. As can be seen, the method of the exemplary embodiments of this disclosure processes the original image and can ensure the accuracy of color replacement in the target area of ​​the original image.

[0110] Furthermore, the exemplary embodiments of this disclosure can adjust the original color of the target region based on the candidate color parameters of the target region in the corresponding candidate color interval to obtain a candidate image corresponding to each candidate color interval. Therefore, the target image obtained from the candidate images corresponding to multiple candidate color intervals can retain the details of the non-target regions of the target image to the greatest extent, ensuring that the generated target image meets the requirements. Taking car paint color changing as an example, changing the color of the car paint in a car image can not only ensure the accuracy of the car paint color changing, but also fully retain the detailed features of the car body, meeting the user's requirements for the car color changing effect image.

[0111] In real-world scenarios, different areas of a car may be painted with the same color, or some areas may be painted with one color while other areas are painted with a different color. This type of color-blocking or two-tone painting allows for color changes to be made to different areas of the car's paint, even when there are two or more target colors.

[0112] The foregoing mainly describes the solutions provided by the embodiments of this disclosure. It is understood that, in order to achieve the above functions, the electronic device of the exemplary embodiments of this disclosure may include hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein, this disclosure can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.

[0113] This disclosure embodiment can divide the electronic device into functional units according to the above method example. For example, each function can be divided into a separate functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this disclosure embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0114] By dividing each functional module according to its corresponding function, an exemplary embodiment of this disclosure provides an image processing apparatus, which may be an electronic device or a chip applied to an electronic device. Figure 5 A schematic block diagram of the functional modules of an image processing apparatus according to an exemplary embodiment of the present disclosure is shown. Figure 5 As shown, the image processing apparatus 500 includes:

[0115] The generation module 501 is used to adjust the original color parameters of the target region of the original image based on the target color configuration parameters to obtain the initial color parameters of the target region, determine the candidate color parameters of the target region in multiple candidate color intervals based on the initial color parameters of the target region, and adjust the original color of the target region based on the candidate color parameters of the target region in each candidate color interval to obtain candidate images corresponding to multiple candidate color intervals.

[0116] The filtering module 502 is used to obtain a target image from multiple candidate images corresponding to multiple candidate color ranges, wherein the target image includes candidate images that meet the target color filtering conditions among the multiple candidate images corresponding to multiple candidate color ranges.

[0117] In one possible implementation, the target color configuration parameters include a reference color parameter and a color offset parameter determined by the target color parameter, wherein the reference color parameter of the target area is determined by the original color of the target object in the target area.

[0118] In one possible implementation, the initial color parameters of the target region include initial color parameters of multiple reference positions located in the target region, wherein the initial color parameter of each reference position is determined by the target color configuration parameters and the original color parameters corresponding to the reference position.

[0119] In one possible implementation, the generation module 501 is used to determine an initial color range of the target region based on the initial color parameters of the target region; and to determine candidate color parameters of the target region in multiple candidate color ranges based on the initial color range of the target region, the initial color parameters of the target region, and multiple candidate color ranges.

[0120] In one possible implementation, the generation module 501 is used to determine the color migration parameters of the target region based on the initial color range of the target region and the initial color parameters of the target region; and to determine the candidate color parameters of the target region in multiple candidate color ranges based on the color migration parameters of the target region and multiple candidate color ranges.

[0121] In one possible implementation, the initial color parameters of the target region include initial color parameters at multiple reference locations within the target region, the color migration parameters of the target region include the degree of fluctuation of the initial colors at the multiple reference locations relative to the target limit color of the initial color interval, and the candidate color parameters of the target region in each candidate color interval include candidate color parameters at the multiple reference locations in each candidate color interval.

[0122] In one possible implementation, the generation module 501 is used to determine the relative initial color parameter of each reference position based on the initial color parameter of each reference position and the target limit color parameter of the initial color interval; and to determine the color migration parameter of the target region based on the change of the limit color parameter of the initial color interval and the relative initial color parameter of each reference position.

[0123] In one possible implementation, the generation module 501 is used to determine the relative candidate color parameters of the multiple reference positions in each candidate color interval based on the extreme color parameter changes of each candidate color interval and the degree of fluctuation of the initial color parameters of the multiple reference positions in the initial color interval.

[0124] Based on the relative candidate color parameters of the multiple reference positions in the multiple candidate color intervals and the target limit color parameters of the multiple candidate color intervals, the candidate color parameters of the target region in the multiple candidate color intervals are determined.

[0125] In one possible implementation, if the target color of the target region is grayscale, the range of candidate brightness parameters and the range of candidate saturation parameters are different for different candidate color intervals.

[0126] If the target color of the target region is colored, the range of candidate hue parameters will be different for different candidate color intervals.

[0127] In one possible implementation, the candidate image corresponding to each candidate color interval is determined by the weighted value of the candidate color parameters of the target region in the corresponding candidate color interval and the original image.

[0128] Wherein, the weighted value of the candidate color parameter of the target region in the corresponding candidate color interval is equal to the target region mask of the original image, and the weighted value of the original image is equal to the non-target region mask of the original image.

[0129] Figure 6 A schematic block diagram of a chip according to an exemplary embodiment of the present disclosure is shown. Figure 6 As shown, the chip 600 includes one or more processors 601 and a communication interface 602. The communication interface 602 can support electronic devices in performing the data transmission and reception steps in the above-described image processing method, and the processor 601 can support a server in performing the data processing steps in the above-described image processing method.

[0130] Optional, such as Figure 6 As shown, the chip 600 also includes a memory 603, which may include read-only memory and random access memory, and provides operation instructions and data to the processor. A portion of the memory may also include non-volatile random access memory (NVRAM).

[0131] In some implementations, such as Figure 6 As shown, processor 601 executes corresponding operations by calling operation instructions stored in memory (which may be stored in the operating system). Processor 601 controls the processing operations of any terminal device; processor can also be called a central processing unit (CPU). Memory 603 may include read-only memory and random access memory, and provides instructions and data to processor 601. A portion of memory 603 may also include NVRAM. For example, in applications, memory, communication interfaces, and other components are coupled together via a bus system, which may include, in addition to a data bus, a power bus, a control bus, and a status signal bus, etc. However, for clarity, in... Figure 6 The general designated all buses as Bus System 604.

[0132] The methods disclosed in the embodiments of this disclosure can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above methods can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an ASIC, a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this disclosure can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above methods.

[0133] Exemplary embodiments of this disclosure also provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to cause the electronic device to perform a method according to an embodiment of this disclosure.

[0134] Exemplary embodiments of this disclosure also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to embodiments of this disclosure.

[0135] Exemplary embodiments of this disclosure also provide a computer program product, including a computer program, wherein, when executed by a processor of a computer, the computer program is used to cause the computer to perform a method according to an embodiment of this disclosure.

[0136] refer to Figure 7The present invention describes a structural block diagram of an electronic device 700 that can serve as a server or client of the present disclosure, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0137] like Figure 7 As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. The RAM 703 may also store various programs and data required for the operation of the device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0138] like Figure 7 As shown, multiple components in electronic device 700 are connected to I / O interface 705, including: input unit 706, output unit 707, storage unit 708, and communication unit 709. Input unit 706 can be any type of device capable of inputting information to electronic device 700. Input unit 706 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 707 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 708 may include, but is not limited to, disks and optical discs. Communication unit 709 allows electronic device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.

[0139] like Figure 7As shown, computing unit 701 can be various general-purpose and / or dedicated processing components with processing and computing capabilities. Some examples of computing unit 701 include, but are not limited to, central processing unit (CPU), graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Computing unit 701 performs the various methods and processes described above. For example, in some embodiments, the methods of exemplary embodiments of this disclosure can be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 700 via ROM 702 and / or communication unit 709. In some embodiments, computing unit 701 can be configured to perform the methods of exemplary embodiments of this disclosure by any other suitable means (e.g., by means of firmware).

[0140] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0141] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0142] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0143] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0144] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.

[0145] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this disclosure are performed, in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a terminal, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center integrating one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video disc (DVD); or it can be a semiconductor medium, such as a solid-state drive (SSD).

[0146] Although this disclosure has been described in conjunction with specific features and embodiments, it will be apparent that various modifications and combinations can be made therein without departing from the spirit and scope of this disclosure. Accordingly, this specification and drawings are merely exemplary illustrations of the disclosure as defined by the appended claims and are to be considered as covering any and all modifications, variations, combinations, or equivalents within the scope of this disclosure. It is obvious that those skilled in the art can make various alterations and modifications to this disclosure without departing from its spirit and scope. Thus, this disclosure is also intended to include any such modifications and modifications that fall within the scope of the claims of this disclosure and their equivalents.

Claims

1. An image processing method, characterized by, include: The original color parameters of the target region in the original image are adjusted based on the target color configuration parameters to obtain the initial color parameters of the target region. The target color configuration parameters include reference color parameters and color offset parameters determined by the target color parameters. The reference color parameters of the target region are determined by the original color of the target object in the target region. Based on the initial color parameters of the target region, determine the candidate color parameters of the target region in multiple candidate color intervals; Based on the candidate color parameters of the target region in multiple candidate color intervals, the original color of the target region is adjusted to obtain candidate images corresponding to multiple candidate color intervals; A target image is obtained from candidate images corresponding to multiple candidate color ranges, wherein the target image includes candidate images that satisfy the target color filtering conditions from among the candidate images corresponding to the multiple candidate color ranges; wherein... The step of determining the candidate color parameters of the target region in multiple candidate color intervals based on the initial color parameters of the target region includes: Based on the initial color parameters of the target region, determine the initial color range of the target region; Based on the initial color range and initial color parameters of the target region, determine the color migration parameters of the target region; Based on the color migration parameters of the target region and multiple candidate color intervals, candidate color parameters of the target region in multiple candidate color intervals are determined, wherein the color migration parameters of the target region include the degree of fluctuation of the initial color at multiple reference positions relative to the target limit color of the initial color interval.

2. The method according to claim 1, characterized in that, The initial color parameters of the target area include initial color parameters of multiple reference positions located in the target area. The initial color parameter of each reference position is determined by the target color configuration parameters and the original color parameters corresponding to the reference position.

3. The method according to claim 1, characterized in that, The initial color parameters of the target region include initial color parameters at multiple reference positions located in the target region. The color migration parameters of the target region include the degree of fluctuation of the initial colors at multiple reference positions relative to the target limit color of the initial color interval. The candidate color parameters of the target region in each candidate color interval include candidate color parameters at multiple reference positions in each candidate color interval.

4. The method according to claim 3, characterized in that, The determination of color migration parameters for the target region based on the initial color range and initial color parameters of the target region includes: Based on the initial color parameters of each reference position and the target limit color parameters of the initial color range, the relative initial color parameters of each reference position are determined. The color migration parameters of the target region are determined based on the extreme color parameter changes of the initial color range and the relative initial color parameters of each reference position.

5. The method according to claim 3, characterized in that, The step of determining the candidate color parameters of the target region in multiple candidate color intervals based on the color migration parameters of the target region and multiple candidate color intervals includes: Based on the extreme color parameter changes of each candidate color interval and the fluctuation of the initial color parameters of multiple reference positions in the initial color interval, the relative candidate color parameters of the multiple reference positions in each candidate color interval are determined. Based on the relative candidate color parameters of the multiple reference positions in the multiple candidate color intervals and the target limit color parameters of the multiple candidate color intervals, the candidate color parameters of the target region in the multiple candidate color intervals are determined.

6. The method according to claim 1, characterized in that, If the target color of the target region is grayscale, the range of candidate brightness parameters and the range of candidate saturation parameters are different for different candidate color intervals; If the target color of the target region is colored, the range of candidate hue parameters will be different for different candidate color intervals.

7. The method according to any one of claims 1 to 6, characterized in that, The candidate image corresponding to each candidate color interval is determined by the candidate color parameters of the target region in the corresponding candidate color interval and the weighted value of the original image; Wherein, the weighted value of the candidate color parameter of the target region in the corresponding candidate color interval is equal to the target region mask of the original image, and the weighted value of the original image is equal to the non-target region mask of the original image.

8. An image processing apparatus, characterized in that, include: A generation module is used to adjust the original color parameters of a target region in the original image based on target color configuration parameters to obtain initial color parameters of the target region; determine an initial color range of the target region based on the initial color parameters of the target region; determine color migration parameters of the target region based on the initial color range and the initial color parameters of the target region; determine candidate color parameters of the target region in multiple candidate color ranges based on the color migration parameters of the target region and multiple candidate color ranges, wherein the color migration parameters of the target region include the degree of fluctuation of the initial color at multiple reference positions relative to the target limit color of the initial color range; adjust the original color of the target region based on the candidate color parameters of the target region in each candidate color range to obtain candidate images corresponding to multiple candidate color ranges; the target color configuration parameters include reference color parameters and color offset parameters determined by the target color parameters, wherein the reference color parameters of the target region are determined by the original color of the target object in the target region; The filtering module is used to obtain a target image from candidate images corresponding to multiple candidate color ranges, wherein the target image includes candidate images that meet the target color filtering conditions among the multiple candidate images corresponding to the multiple candidate color ranges.

9. An electronic device, characterized in that, include: processor; as well as, Memory for stored programs; The program includes instructions that, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores computer instructions for causing the computer to perform the method according to any one of claims 1 to 7.