Image color adjustment method and apparatus, device, readable storage medium, and product

By identifying the color information of the reference image, the color adjustment of the edited image is solved, and the problem of low image color matching efficiency in the prior art is achieved, more efficient and personalized color matching is achieved, and the harmony and display effect of the image is improved.

WO2024240159A1PCT designated stage expired Publication Date: 2024-11-28BEIJING ZITIAO NETWORK TECH CO LTD

Patent Information

Application Number
PCT/CN2024/094557
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-23
Filing Date
2024-05-21
Publication Date
2024-11-28

AI Technical Summary

Technical Problem

The existing image color matching methods are inefficient and consume human resources. They cannot support large-scale color collection, color matching and color change tasks, and cannot effectively meet users' personalized needs.

Method used

By obtaining the image to be edited and the reference image, the color information of the reference image is recognized, and color adjustments are made to the decorative content in the image to be edited based on the information, including background and text content, to achieve color coordination and personalized matching.

Benefits of technology

It improves the efficiency and accuracy of image color adjustment, reduces human resources investment, and better meets users' personalized needs, making the adjusted image color more harmonious and eye-catching, and improving the display effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024094557_28112024_PF_FP_ABST
    Figure CN2024094557_28112024_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present invention provide an image color adjustment method and apparatus, a device, a readable storage medium, and a product. The method comprises: acquiring an image to be edited and a reference image; performing a color recognition operation on the reference image to obtain color information corresponding to the reference image; and on the basis of the color information corresponding to the reference image, performing a color adjustment operation on decoration content in the image to be edited to obtain a target image, wherein the decoration content comprises one or more of background content, text content, and pattern decoration content. Therefore, the color of the image to be edited can be adjusted on the basis of a user-defined reference image, so that the color of the generated target image is more suitable for the personalized requirements of a user, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Image color adjustment method, device, equipment, readable storage medium and product

[0001] This application claims priority to the Chinese invention patent application entitled “Image color adjustment method, device, equipment, readable storage medium and product” filed on May 23, 2023, with application number 202310587509X. The entire contents of that application are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present disclosure relate to the field of image processing technology, and in particular to an image color adjustment method, apparatus, device, readable storage medium, and product. Background Art

[0003] The use of color plays a crucial role in both life and design. In practical applications, color design is required in many scenarios, such as advertising and application design. A good color scheme can effectively enhance the display quality of an image.

[0004] In current image color matching scenarios, users generally select corresponding colors based on actual needs and personal experience for manual color matching. However, the above color matching methods are often labor-intensive and have low color matching efficiency.

[0005] Summary of the Invention

[0006] The embodiments of the present disclosure provide an image color adjustment method, apparatus, device, readable storage medium, and product, which are used to solve the technical problems of low efficiency and high human resource consumption of existing color matching methods.

[0007] In a first aspect, an embodiment of the present disclosure provides an image color adjustment method, comprising: obtaining an image to be edited and a reference image; performing a color recognition operation on the reference image to obtain color information corresponding to the reference image; performing a color adjustment operation on decorative content in the image to be edited based on the color information corresponding to the reference image to obtain a target image, wherein the decorative content includes one or more of background content, text content, and pattern decorative content.

[0008] In a second aspect, an embodiment of the present disclosure provides an image color adjustment device, comprising: an acquisition module for acquiring an image to be edited and a reference image; an identification module for performing a color recognition operation on the reference image to obtain color information corresponding to the reference image; and an adjustment module for performing a color adjustment operation on the decorative content in the image to be edited based on the color information corresponding to the reference image to obtain a target image, wherein the decorative content includes one or more of background content, text content, and pattern decorative content.

[0009] In a third aspect, an embodiment of the present disclosure provides an electronic device comprising: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the image color adjustment method described in the first aspect and various possible designs of the first aspect.

[0010] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the image color adjustment method described in the first aspect and various possible designs of the first aspect is implemented.

[0011] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the image color adjustment method described in the first aspect and various possible designs of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0013] FIG1 is a system architecture based on which the embodiments of the present disclosure are based;

[0014] FIG2 is a schematic diagram of a flow chart of an image color adjustment method provided by an embodiment of the present disclosure;

[0015] FIG3 is a schematic flow chart of an image color adjustment method provided by another embodiment of the present disclosure;

[0016] FIG4 is a schematic diagram of a color distribution model provided by an embodiment of the present disclosure;

[0017] FIG5 is a schematic flow chart of an image color adjustment method provided by yet another embodiment of the present disclosure;

[0018] FIG6 is a schematic structural diagram of an image color adjustment device provided by an embodiment of the present disclosure;

[0019] FIG7 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.

[0021] In order to solve the technical problems that existing color matching methods are low in efficiency and consume a lot of human resources, the present disclosure provides an image color adjustment method, device, equipment, readable storage medium and product.

[0022] It should be noted that the image color adjustment method, device, equipment, readable storage medium and product provided by the present disclosure can be applied in any scenario of image color adjustment.

[0023] Modern art's study of color primarily focuses on the human eye's perception of color, striving to explore color combinations that create beauty and pleasure. Color matching is involved in many aspects of daily life, production, design, and marketing, such as advertising and application design. Traditionally, color matching typically required the involvement of designers, performing manual color matching. However, manual color matching cannot support the demands of large-scale color extraction, matching, and replacement tasks, and is also inefficient.

[0024] In the process of solving the above technical problems, the inventors discovered through research that, in order to make the colors of the image to be edited more harmonious and meet the user's personalized needs, the image to be edited and a reference image can be obtained separately. The color information corresponding to the reference image is identified, and the color adjustment operation is performed on the decorative content in the image to be edited based on the color information of the reference image.

[0025] In some embodiments, a color adjustment operation can be performed on the background area of ​​the image to be edited based on the color information of the reference image to obtain an adjusted image to be edited, so that the color of the background area of ​​the adjusted image to be edited is more coordinated with the color of the reference image.

[0026] Furthermore, a second target color corresponding to the text content can be determined based on the adjusted background area and / or reference image in the image to be edited, and a color adjustment operation can be performed on the text content based on the second target color to obtain a target image, so that the text part is more eye-catching in the target image.

[0027] FIG1 illustrates the system architecture underlying the embodiments of the present disclosure. As shown in FIG1 , the system architecture underlying the present disclosure includes at least a terminal device 11 and a server 12. In some embodiments, the server 12 is provided with an image color adjustment device, which can be written in a language such as C / C++, Java, Shell, or Python; the terminal device 1 can be, for example, a desktop computer or tablet computer.

[0028] Based on the above system architecture, the server 12 can obtain the image processing request sent by the terminal device, and adjust the decorative content in the image to be edited based on the color information corresponding to the reference image.

[0029] FIG2 is a flow chart of an image color adjustment method provided by an embodiment of the present disclosure. As shown in FIG2 , the method includes:

[0030] Step 201: Acquire an image to be edited and a reference image.

[0031] The execution subject of this embodiment is an image color adjustment device, which can be coupled to a server. The server can be connected to a terminal device for communication, thereby being able to exchange information with the terminal device.

[0032] In this embodiment, an image to be edited, determined by the user based on actual needs, can be obtained. For example, the image to be edited can be a poster corresponding to an object, which includes the object's image, background color, and textual description of the object. If the user finds that the tones of the target area, background area, or text content in the image to be edited are not aesthetically pleasing and fail to meet the user's personalized needs, the user can adjust the color of the image to be edited.

[0033] In order to improve the display effect of the image to be edited and make the color of the image to be edited more in line with the personalized needs of the user, a reference image can also be obtained.

[0034] In some embodiments, the image to be edited may be generated by the user in real time or retrieved from a preset storage path. The reference image may include an image uploaded by the user or captured in real time, or may include image material preset in the image to be edited, which is not limited in this disclosure.

[0035] Continuing with the above example, when the image to be edited is a poster of an object, the image to be edited may include image material corresponding to the object, and the image material may be determined as a reference image.

[0036] Step 202: Perform a color recognition operation on the reference image to obtain color information corresponding to the reference image.

[0037] In this embodiment, in order to make the color of the image to be edited more in line with the personalized needs of the user, after the image to be edited is acquired, the color of the image to be edited may be adjusted based on the color of the reference image.

[0038] Furthermore, a color recognition operation may be performed on the reference image to obtain color information corresponding to the reference image. In some embodiments, the color information includes a color parameter corresponding to at least one color.

[0039] For example, the reference image may include colors such as yellow, red, and green, and the color information may include RGB values, saturation information, brightness information, hue information, etc. corresponding to each color.

[0040] In some embodiments, when there are multiple reference images, each reference image corresponds to multiple colors. When determining color information, the color parameters corresponding to the N colors with the highest percentages can be selected as the color information from the colors corresponding to the multiple reference images. Alternatively, the color parameters corresponding to a predetermined number of colors from the color swatch corresponding to each reference image can be selected as the color information, although this disclosure is not limited thereto.

[0041] Step 203: Perform color adjustment on the decorative content in the image to be edited based on the color information corresponding to the reference image to obtain a target image. In some embodiments, the decorative content includes one or more of background content, text content, and pattern decorative content.

[0042] In this embodiment, after the color information corresponding to the reference image is determined, a color adjustment operation can be performed on the image to be edited based on the color information.

[0043] In some embodiments, the image to be edited may include image material and decorative content. In some embodiments, the decorative content includes one or more of background content, text content, and pattern decorative content. When color adjustment is performed on the image to be edited, the color adjustment operation may be performed only on the decorative content to obtain the target image.

[0044] The image color adjustment method provided in this embodiment obtains the image to be edited and a reference image, performs color recognition on the reference image, and then performs color adjustment on the decorative content in the image to be edited based on the color information corresponding to the reference image. This allows the color of the decorative content in the image to be edited to match the color information of the reference image, making the generated target image more personalized for the user.

[0045] In some embodiments, based on any of the above embodiments, step 202 includes: using a preset color extraction algorithm to extract color information corresponding to the reference image to obtain color information corresponding to the reference image.

[0046] In this embodiment, in order to extract the color information of the reference image, at least one color extraction algorithm can be pre-set. In some embodiments, the color extraction algorithm includes but is not limited to:

[0047] Intelligent classification method: Automatically divide categories according to the maximum and minimum values ​​of the RGB channels, and then calculate the mean output separately.

[0048] Smart Clustering: This is the default color selection method. It uses the Kmeans algorithm to cluster the colors in the image based on the specified number of colors, with the center of each cluster serving as the representative value for each color.

[0049] Superpixel method: The superpixel method uses each color block as the minimum color calculation unit. Superpixel calculation can be used as a submodule of other color extraction algorithms.

[0050] Perceptual weighting method: People are more easily attracted to bright colors. The perceptual weighting method gives higher weights to colors with high saturation and brightness. It can be used as a submodule of other color extraction algorithms.

[0051] Users can select different color picking algorithms to perform color information recognition operations according to actual needs, and this disclosure does not impose any restrictions on this.

[0052] In some embodiments, after obtaining the reference image, the color information corresponding to the entire reference image can be extracted according to a preset color extraction algorithm to obtain the color information corresponding to the reference image.

[0053] In some embodiments, when there are multiple reference images, each reference image corresponds to multiple colors. When determining color information, color parameters corresponding to the N colors with the highest percentages among the colors corresponding to the multiple reference images may be selected as the color information. Alternatively, color parameters corresponding to a predetermined number of colors in the color swatch corresponding to each reference image may be selected as the color information, although this disclosure is not limited thereto.

[0054] The image color adjustment method provided in this embodiment pre-sets a color picking algorithm, thereby being able to accurately recognize and obtain color information corresponding to a reference image based on the color picking algorithm, thereby facilitating subsequent image color adjustment operations.

[0055] In some embodiments, based on any of the above embodiments, the target area includes a foreground part, a background part and a text part, and step 202 includes: determining the first area, the second area and the third area corresponding to the reference image according to a preset segmentation condition; using a preset color extraction algorithm to perform color extraction operations on the first area, the second area and the third area respectively to obtain a first color combination corresponding to the first area, a second color combination corresponding to the second area and a third color combination corresponding to the third area; based on the first color combination, the second color combination, the third color combination and the preset color filtering conditions, the colors in the first color combination, the second color combination and the third color combination are filtered, and the color information corresponding to the at least one target area is generated based on the filtering results.

[0056] In this embodiment, each reference image may be an image of an object provided by a user. Therefore, each reference image includes a foreground portion, a background portion, and a text portion.

[0057] To more accurately recognize the color information of the reference image, during the recognition process, for each reference image, a first region, a second region, and a third region corresponding to the reference image can be determined based on preset segmentation conditions. In some embodiments, the first region, the second region, and the third region can be the foreground, the background, and the text, respectively, or can be user-defined regions, which are not limited in this disclosure.

[0058] Furthermore, a preset color extraction algorithm can be used to perform color extraction operations on the first area, the second area, and the third area, respectively, to obtain a first color combination corresponding to the first area, a second color combination corresponding to the second area, and a third color combination corresponding to the third area. Based on the first color combination, the second color combination, the third color combination, and a preset color filtering condition, a filtering operation is performed on the colors in the first color combination, the second color combination, and the third color combination to obtain color information corresponding to at least one reference image.

[0059] In some embodiments, the color parameters corresponding to the N colors with the highest proportions in the first color combination, the second color combination, and the third color combination can be selected as the color information. Alternatively, the color parameters corresponding to a preset number of colors in the first color combination, the second color combination, and the third color combination can be selected as the color information, and this disclosure does not limit this.

[0060] The image color adjustment method provided in this embodiment performs color extraction operations on the first area, second area and third area of ​​each reference image according to a preset color extraction algorithm, thereby being able to determine the color information corresponding to each reference image in a more fine-grained manner, and then more accurately implement the image color adjustment operation based on the color information.

[0061] In some embodiments, based on any of the above embodiments, step 202 includes: identifying a region to be removed in the reference image that meets a preset removal condition. For a target region in the reference image other than the region to be removed, extracting color information corresponding to the target region using a preset color extraction algorithm to obtain color information corresponding to the reference image.

[0062] In this embodiment, the reference image may also be a person image. When color extraction is performed based on the person image, parts such as the person's hair color and skin color may be extracted, and color extraction is performed based on the remaining parts.

[0063] In some embodiments, when the reference image is another type of image, the user can also select the area to be removed according to actual needs and perform color extraction based on the remaining part. For example, the user can determine the area to be removed in the reference image by smearing.

[0064] In some embodiments, regions to be removed that meet preset removal criteria can be identified in a reference image. For example, a preset image recognition algorithm can be used to identify regions to be removed that meet preset removal criteria in a reference image. This image recognition algorithm can be used to achieve different effects for different application scenarios. Continuing with the above example, this image recognition algorithm can be a hair recognition algorithm, a skin recognition algorithm, etc. This disclosure does not limit this image recognition algorithm.

[0065] For the area other than the area to be removed in the reference image, a preset color extraction algorithm is used to extract the color information corresponding to the reference image to obtain color information corresponding to at least one reference image.

[0066] The image color adjustment method provided in this embodiment removes the area to be removed in the reference image, and uses a preset color extraction algorithm to perform color extraction operations based on the area outside the area to be removed, thereby ensuring that the obtained color information is more in line with the user's personalized needs and improving the accuracy of image color adjustment.

[0067] FIG3 is a flow chart of an image color adjustment method provided by an embodiment of the present disclosure. As shown in FIG2 , the method includes:

[0068] Step 301: Determine a first target color corresponding to the background content based on the color information, perform a color adjustment operation on the background content in the image to be edited according to the first target color, and obtain an adjusted image to be edited.

[0069] Step 302: Determine a second target color corresponding to the text content based on the color information corresponding to the background area in the adjusted image to be edited and / or the reference image, and perform a color adjustment operation on the text content based on the second target color to obtain the target image.

[0070] In this embodiment, in order to make the color of the background area in the image to be edited more harmonious and improve the display effect of the image to be edited, a color adjustment operation may be performed on the background area based on the color information corresponding to the reference image.

[0071] In some embodiments, a first target color corresponding to the background region can be determined based on the color information, and a color adjustment operation can be performed on the background region of the image to be edited according to the first target color to obtain an adjusted image to be edited. In some embodiments, the first target color can be a color in the same color family as the color information. After the color adjustment operation is performed on the background region using the first target color, the background region of the image to be edited can be made more harmonious in color with the reference image.

[0072] Furthermore, in the image to be edited, the text content often records a lot of effective information. Therefore, in order to enable the user to view the text content more intuitively, the color of the text content can be adjusted to make the text content more prominent and eye-catching.

[0073] In some embodiments, the text content may be displayed in the background area, in the reference image, or in both the background area and the reference image after the adjustment to the image to be edited. To improve the contrast between the text content and its surrounding area, a second target color corresponding to the text content may be determined based on the color-adjusted background area of ​​the adjusted image to be edited and / or the reference image. The text content may then be color-adjusted based on the second target color to obtain the adjusted target image.

[0074] In some embodiments, when using the first target color and the second target color for color adjustment, the color of the background area can be directly replaced with the first target color, and the color of the text content can be replaced with the second target color. This disclosure does not limit this.

[0075] The image color adjustment method provided in this embodiment extracts color information from a reference image. This allows for color adjustment of the background area of ​​the image to be edited based on this color information, resulting in an adjusted image to be edited. This allows the color of the background area of ​​the adjusted image to be edited to be more harmonious with the color of the reference image. Furthermore, a second target color corresponding to the text content can be determined based on the background area of ​​the adjusted image to be edited and / or the reference image. Based on the second target color, color adjustment is performed on the text content to obtain an adjusted target image. This results in a more harmonious color in the target image, making the text more prominent and enhancing the display quality of the target image.

[0076] Furthermore, based on any of the above embodiments, after step 202, the method further includes: extracting color information corresponding to the reference image using a preset color extraction algorithm to obtain color information to be processed corresponding to the reference image; and filtering colors in the color information to be processed that exceed a preset parameter threshold to obtain the color information.

[0077] In this embodiment, each reference image may contain some colors with high saturation. Adjusting the background area and text area based on the colors with high saturation will result in poor display effect of the adjusted target image, affecting the user experience.

[0078] Therefore, a preset color extraction algorithm can be used to extract the color information corresponding to the reference image to obtain the color information to be processed corresponding to the reference image. For each color in the color information to be processed, the colors exceeding the preset parameter threshold can be filtered out, and the color parameter information corresponding to the remaining colors is determined as the color information.

[0079] In some embodiments, the parameter threshold can be set by the user according to actual needs, or can be a preset default value, which is not limited in this disclosure.

[0080] The image color adjustment method provided in this embodiment obtains color information by removing the brighter colors in the reference image based on preset designer criteria in advance. When the image color is subsequently adjusted based on the color information, the adjusted color tone is more harmonious and softer, thereby improving the image quality.

[0081] In some embodiments, based on any of the above embodiments, step 203 includes: determining, based on the color information and at least one preset color distribution model, a target model whose matching degree with the color information satisfies a preset matching condition; and adjusting the color information to a target color range corresponding to the target model to obtain the first target color.

[0082] In this embodiment, after the color information is acquired, the color information of the reference image may not be harmonious enough, which may result in the target image having a less harmonious and uniform color after color adjustment based on the color information, leading to a poor user experience.

[0083] Therefore, to better perform color adjustment based on color information, color harmony processing can be performed based on this color information to obtain a first target color with color harmony. Color adjustment based on this first target color can ensure a unified, harmonious, and pleasing color combination in the target image. In practical applications, color harmony can be broadly categorized into contrasting color harmony, adjacent color harmony, homogeneous color harmony, and harmony between bleak, glossy colors and other colors.

[0084] To achieve color harmony, a color distribution model based on hues in the HSV / HSB / HSL space can be created based on experience. For each color distribution model, multiple colors whose color parameters fall within a predetermined range are considered harmonious. For example, color harmony based on a particular distribution model can be achieved by contrasting colors.

[0085] Figure 4 is a schematic diagram of a color distribution model provided in an embodiment of the present disclosure. To achieve color harmony, eight color distribution models can be preset, with different color distribution models corresponding to different styles. As shown in Figure 4, color distribution model 41 can specifically be a T-shaped distribution model. It can be composed of a color wheel 42 formed by hues in the HSV / HSB / HSL space and a gray area 43. In some embodiments, the angle of gray area 43 is fixed, and the center direction can rotate around the center of the circle.

[0086] Therefore, after determining the color information of the reference image, a target model can be determined based on the color information and a preset number of color distribution models, whose matching degree with the color information satisfies preset matching conditions. In some embodiments, the colors in the color information can be distributed within the color distribution models, and the color distribution model with the highest degree of overlap between the distributed colors and the gray area can be determined as the target model. Alternatively, a color distribution model that matches different application scenarios can be selected, and this disclosure does not impose any limitations on this.

[0087] Furthermore, the color information corresponding to the reference image may partially fall within the gray area of ​​the target model and partially fall outside the gray area. To achieve color harmony, the color information of the reference image can be adjusted to the color range corresponding to the target model to obtain an adjusted first target color.

[0088] The image color adjustment method provided in this embodiment pre-sets different color distribution models, thereby being able to quickly and accurately achieve color harmonization operations based on the color distribution models. Therefore, when the image color is subsequently adjusted based on the color information, the adjusted color tone is more harmonious and softer, thereby improving the image quality.

[0089] In some embodiments, based on any of the above embodiments, step 203 includes: determining, based on the color information, a target color whose color proportion in the image to be edited exceeds a preset ratio threshold; determining, based on the target color, a target gradient color template from a plurality of preset gradient color templates whose matching degree with the target color satisfies a preset matching condition; and determining at least one color in the target gradient color template as the first target color.

[0090] In this embodiment, "gradient colors" are increasingly being used in design, including UI interfaces, brand logos, posters, illustrations, font design, and more. Gradients not only bring visual appeal to users, but also create a unique atmosphere. Common gradient colors include light-dark gradients and dark-light gradients, that is, transitioning from one color to another in a regular color transition. Gradient colors can give a plain design a sense of layering and rhythm.

[0091] Therefore, in order to implement the color adjustment operation of the image to be edited, a plurality of gradient color templates can be pre-set, and different gradient color templates correspond to different colors. After determining the color information, the target color whose color proportion in the reference image exceeds the preset ratio threshold can be determined. Based on the target color, a target gradient color template whose matching degree with the target color meets the preset matching conditions is determined among the preset multiple gradient color templates. In some embodiments, the gradient color template with the highest similarity to the target color among the multiple gradient color templates can be determined as the target gradient color template. Furthermore, at least one color in the target gradient color template can be determined as the first target color corresponding to the background area.

[0092] The image color adjustment method provided in this embodiment determines a target gradient color template based on color information and performs an image color adjustment operation based on the target gradient color template, thereby increasing the layering of the target image and making the color tone of the background area in the target image more harmonious with the color tone of the reference image.

[0093] It should be noted that the above two embodiments can be implemented separately or in combination. When implemented in combination, the present disclosure does not limit the order in which the two embodiments are implemented. For example, color harmonization processing can be performed based on color information first, and then a matching target gradient color template can be determined based on the harmonized colors.

[0094] In some embodiments, based on any of the above embodiments, step 203 includes: based on the hue information and lightness information corresponding to the image to be edited in the color information, selecting a target color matching template from a plurality of preset color matching templates that matches the hue information and lightness information, and determining at least one color in the target color matching template as the first target color.

[0095] In this embodiment, a plurality of color matching templates may be pre-set, and image color adjustment based on the color matching templates can obtain high-quality image effects.

[0096] Therefore, after determining the reference image, a target color matching template that matches the hue information and lightness information of the reference image in the color information can be selected from a plurality of preset color matching templates. At least one color in the target color matching template can be determined as a first target color.

[0097] The image color adjustment method provided in this embodiment is based on the hue information and brightness information corresponding to the reference image in the color information, and selects a target color matching template that matches the hue information and brightness information in a plurality of preset color matching templates, so that the adjusted target image can be more beautiful on the basis of automatically achieving image color adjustment.

[0098] FIG5 is a flow chart of an image color adjustment method provided by another embodiment of the present disclosure. Based on any of the above embodiments, as shown in FIG5 , step 204 includes:

[0099] Step 501: Determine the position information of the text content in the image to be edited.

[0100] Step 502: Determine the background content in a preset area around the text content and / or the area color corresponding to the reference image based on the position information.

[0101] Step 503: Determine a second target color corresponding to the text content based on the region color.

[0102] In this embodiment, in order to enable the user to view the text content more intuitively, the color of the text content may be adjusted so that the text content can be more prominent and eye-catching on the second image.

[0103] In some embodiments, the text content may be displayed in the second image in the background area, in the reference image, or in both the background area and the reference image. Therefore, to accurately adjust the color of the text content, the position of the text content in the image to be edited can be determined. In some embodiments, any identification method can be used to determine the position information, and this disclosure does not limit this.

[0104] Furthermore, based on the position information, a background area and / or a regional color corresponding to a reference image within a predetermined area surrounding the text content is determined. Based on the regional color, a second target color corresponding to the text content is determined. During the determination of the second target color, the contrast between the color of the text content and the regional color can be increased to make the text content stand out more.

[0105] Further, based on any of the above embodiments, determining the second target color corresponding to the text content based on the region color includes:

[0106] Based on the saturation information and / or brightness information corresponding to the regional color, the target saturation information and / or target brightness information whose contrast with the regional color meets the preset contrast threshold is determined through a preset adjustment algorithm, and the target saturation information and / or target brightness information is determined as the second target color.

[0107] In this embodiment, to make the text content more prominent on the second image, the saturation and / or brightness of the text content can be adjusted to increase the contrast between the text content and the underlying area. Therefore, based on the saturation information and / or brightness information corresponding to the regional color, a preset adjustment algorithm can be used to determine target saturation information and / or target brightness information whose contrast with the regional color meets a preset contrast threshold, and the target saturation information and / or target brightness information can be determined as the second target color.

[0108] As an implementable approach, the brightness and saturation of the text may be adjusted based on the saturation information and / or brightness information corresponding to the regional color according to the ACPA standard and the golden ratio to enhance the text contrast.

[0109] The image color adjustment method provided in this embodiment determines the background area and / or the regional color corresponding to the reference image within a preset area around the text content based on position information, and determines the target saturation information and / or target brightness information whose contrast with the regional color meets a preset contrast threshold through a preset adjustment algorithm based on the saturation information and / or brightness information corresponding to the regional color, and determines the target saturation information and / or target brightness information as the second target color, thereby improving the contrast between the adjusted text content and the preset area around it, making the text content more vivid and intuitive, and improving the quality of the target image.

[0110] In some embodiments, based on any of the above embodiments, the number of the images to be edited is multiple; after step 202, it also includes: determining at least one target image to be edited that matches the color information among the multiple images to be edited based on the color information; displaying the reference image in the first display area of ​​the display interface, and displaying the at least one target image to be edited in the second display area of ​​the display interface.

[0111] In this embodiment, the current display interface can generally display multiple images. In order to make the multiple images color-harmonious and improve the user's browsing experience, other images can be selected based on the main image on the display interface.

[0112] In some embodiments, the reference image may be the main image on the display interface, and the image to be edited may be an image to be selected. The number of images to be edited may be multiple. After color recognition of the reference image, at least one target image to be edited that matches the color information can be determined from the multiple images to be edited based on the color information. The reference image is displayed in the first display area of ​​the display interface, and at least one target image to be edited is displayed in the second display area of ​​the display interface. In some embodiments, the display parameters such as the display position and display size of the first display area may be default parameters, or they may be adjusted by the user according to actual needs, and the present disclosure does not impose any restrictions on this.

[0113] The image color adjustment method provided in this embodiment optimizes the display effect within the display interface and enhances the user's browsing experience by selecting at least one target image to be edited that matches the color information of a reference image for display based on the color information of the reference image.

[0114] FIG6 is a schematic diagram of the structure of an image color adjustment device provided in an embodiment of the present disclosure. As shown in FIG6 , the device includes: an acquisition module 61, an identification module 62, and an adjustment module 63. The acquisition module 61 is used to acquire an image to be edited and a reference image. The identification module 62 is used to perform a color recognition operation on the reference image to obtain color information corresponding to the reference image. The adjustment module 63 is used to perform a color adjustment operation on the decorative content in the image to be edited based on the color information corresponding to the reference image to obtain a target image. In some embodiments, the decorative content includes one or more of background content, text content, and pattern decorative content.

[0115] Furthermore, based on any of the above embodiments, the recognition module is configured to: determine, based on preset segmentation conditions, a first region, a second region, and a third region corresponding to the reference image; perform color extraction operations on the first region, the second region, and the third region, respectively, using a preset color extraction algorithm to obtain a first color combination corresponding to the first region, a second color combination corresponding to the second region, and a third color combination corresponding to the third region; perform a color filtering operation on the colors in the first color combination, the second color combination, and the third color combination based on the first color combination, the second color combination, and the third color combination and preset color filtering conditions, and generate color information corresponding to the at least one target region based on the filtering results.

[0116] Furthermore, based on any of the above embodiments, the recognition module is configured to: identify a region to be removed in the reference image that satisfies a preset removal condition; and extract color information corresponding to a target region in the reference image other than the region to be removed using a preset color extraction algorithm to obtain color information corresponding to the reference image.

[0117] Further, based on any of the above embodiments, the reference image includes an image uploaded by a user or captured in real time, or the reference image includes an image material preset in the image to be edited.

[0118] Furthermore, based on any of the above embodiments, the adjustment module is configured to: determine a first target color corresponding to the background content based on the color information, perform color adjustment on the background content in the image to be edited based on the first target color, and obtain an adjusted image to be edited; determine a second target color corresponding to the text content based on the color information corresponding to the background area in the adjusted image to be edited and / or the reference image, and perform color adjustment on the text content based on the second target color to obtain the target image.

[0119] Furthermore, based on any of the above embodiments, the adjustment module is configured to: determine, based on the color information and at least one preset color distribution model, a target model whose matching degree with the color information satisfies a preset matching condition; and adjust the color information to fall within a target color range corresponding to the target model to obtain the first target color.

[0120] Furthermore, based on any of the above embodiments, the adjustment module is configured to: determine, based on the color information, a target color whose color proportion in the image to be edited exceeds a preset ratio threshold; determine, based on the target color, a target gradient color template from among a plurality of preset gradient color templates whose degree of matching with the target color satisfies a preset matching condition; and determine at least one color in the target gradient color template as the first target color.

[0121] Furthermore, based on any of the above embodiments, the adjustment module is configured to: based on the hue information and lightness information corresponding to the image to be edited in the color information, determine at least one color in a target color matching template that matches the hue information and lightness information from among a plurality of preset color matching templates as the first target color.

[0122] Furthermore, based on any of the above embodiments, the adjustment module is configured to: determine position information of the text content in the image to be edited; determine background content within a predetermined area surrounding the text content and / or a regional color corresponding to the reference image based on the position information; and determine a second target color corresponding to the text content based on the regional color.

[0123] Furthermore, based on any of the above embodiments, the adjustment module is used to: based on the saturation information and / or brightness information corresponding to the regional color, determine the target saturation information and / or target brightness information whose contrast with the regional color meets a preset contrast threshold through a preset adjustment algorithm, and determine the target saturation information and / or target brightness information as the second target color.

[0124] Furthermore, based on any of the above embodiments, the number of the images to be edited is multiple. The apparatus further includes: a determination module configured to determine, based on the color information, at least one target image to be edited that matches the color information among the multiple images to be edited; and a display module configured to display the reference image in a first display area of ​​a display interface and the at least one target image to be edited in a second display area of ​​the display interface.

[0125] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.

[0126] In order to implement the above embodiments, the embodiments of the present disclosure also provide an electronic device, including: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the processor executes the image color adjustment method as described in any of the above embodiments.

[0127] FIG7 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. As shown in FIG7 , the electronic device 700 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and fixed terminals such as digital TVs and desktop computers. The electronic device shown in FIG7 is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0128] As shown in FIG7 , the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. Various programs and data required for the operation of the electronic device 700 are also stored in the RAM 703. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0129] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although FIG. 7 shows an electronic device 700 having various devices, it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0130] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0131] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0132] In order to implement the above embodiments, the embodiments of the present disclosure further provide a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the image color adjustment method as described in any of the above embodiments is implemented.

[0133] In order to implement the above embodiments, the embodiments of the present disclosure further provide a computer program product, including a computer program, which implements the image color adjustment method as described in any of the above embodiments when executed by a processor.

[0134] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0135] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0136] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet Service Provider).

[0137] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0138] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."

[0139] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

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

[0141] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0142] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0143] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.

Claims

1. A method for adjusting image color, comprising: Obtaining an image to be edited and a reference image; Performing a color recognition operation on the reference image to obtain color information corresponding to the reference image; Based on the color information corresponding to the reference image, a color adjustment operation is performed on the decorative content in the image to be edited to obtain a target image, wherein the decorative content includes one or more of background content, text content, and pattern decorative content.

2. The method according to claim 1, wherein the step of performing a color recognition operation on the reference image to obtain color information corresponding to the reference image comprises: Determine, according to a preset segmentation condition, a first region, a second region, and a third region corresponding to the reference image; Using a preset color extraction algorithm to perform color extraction operations on the first area, the second area, and the third area respectively, to obtain a first color combination corresponding to the first area, a second color combination corresponding to the second area, and a third color combination corresponding to the third area; Based on the first color combination, the second color combination, the third color combination and preset color screening conditions, the colors in the first color combination, the second color combination and the third color combination are screened, and color information corresponding to the at least one target area is generated based on the screening result.

3. The method according to claim 1, wherein the step of performing a color recognition operation on the reference image to obtain color information corresponding to the reference image comprises: Identifying a region to be removed that meets a preset removal condition in the reference image; For the target area in the reference image except the area to be removed, a preset color extraction algorithm is used to extract the color information corresponding to the target area to obtain the color information corresponding to the reference image.

4. The method according to claim 1, wherein the reference image comprises an image uploaded by a user or collected in real time, or the reference image comprises an image material preset in the image to be edited.

5. The method according to any one of claims 1 to 4, wherein the step of performing a color adjustment operation on the decoration content in the image to be edited based on the color information corresponding to the reference image to obtain the target image comprises: Determine a first target color corresponding to the background content based on the color information, and perform a color adjustment operation on the background content in the image to be edited according to the first target color to obtain an adjusted image to be edited; A second target color corresponding to the text content is determined based on the color information corresponding to the background area in the adjusted image to be edited and / or the reference image, and a color adjustment operation is performed on the text content based on the second target color to obtain the target image.

6. The method according to claim 5, wherein determining the first target color corresponding to the background content based on the color information comprises: According to the color information and at least one preset color distribution model, determining a target model whose matching degree with the color information satisfies a preset matching condition; The color information is adjusted to a target color range corresponding to the target model to obtain the first target color.

7. The method according to claim 5, wherein determining the first target color corresponding to the background content based on the color information comprises: Determine, based on the color information, a target color whose color proportion in the image to be edited exceeds a preset ratio threshold; Determining, according to the target color, a target gradient color template from among a plurality of preset gradient color templates, the target gradient color template having a matching degree with the target color that satisfies a preset matching condition; At least one color in the target gradient color template is determined as the first target color.

8. The method according to claim 5, wherein determining the first target color corresponding to the background content based on the color information comprises: Based on the hue information and lightness information corresponding to the image to be edited in the color information, a target color matching template that matches the hue information and lightness information in a plurality of preset color matching templates; Determine at least one color in the target color matching template as the first target color matching template Mark color.

9. The method according to claim 5, wherein the determining the second target color corresponding to the text content based on the color information corresponding to the background area in the adjusted image to be edited and / or the image material comprises: Determining the position information of the text content in the image to be edited; Determine, based on the position information, background content in a preset area around the text content and / or regional color corresponding to the reference image; A second target color corresponding to the text content is determined based on the region color.

10. The method according to claim 9, wherein determining a second target color corresponding to the text content based on the region color comprises: Based on the saturation information and / or brightness information corresponding to the regional color, the target saturation information and / or target brightness information whose contrast with the regional color satisfies a preset contrast threshold is determined through a preset adjustment algorithm, and the target saturation information and / or target brightness information is determined as the second target color.

11. The method according to any one of claims 1 to 4, wherein the number of the images to be edited is multiple; After performing the color recognition operation on the reference image to obtain the color information corresponding to the reference image, the method further includes: Determining at least one target image to be edited that matches the color information among a plurality of images to be edited based on the color information; The reference image is displayed in a first display area of ​​the display interface, and the at least one target image to be edited is displayed in a second display area of ​​the display interface.

12. An image color adjustment device, comprising: An acquisition module, used for acquiring an image to be edited and a reference image; A recognition module, used to perform a color recognition operation on the reference image to obtain color information corresponding to the reference image; The adjustment module is used to perform color adjustment operations on the decorative content in the image to be edited based on the color information corresponding to the reference image to obtain a target image, wherein the decorative content includes one or more of background content, text content, and pattern decorative content.

13. An electronic device, comprising: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the image color adjustment method according to any one of claims 1 to 11.

14. A computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the image color adjustment method according to any one of claims 1 to 11 is implemented.

15. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for adjusting image color according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Page generation method and device, equipment and storage medium

    CN113742025A

  • Image color matching method, device and equipment

    CN114332301A

  • Image color adjustment method and device, equipment, readable storage medium and product

    CN116758305A

  • Image output apparatus and color matching processing method

    JP2011015212A

Cited By

  • Atmosphere lamp, lamp effect control method and device thereof and medium

    CN120640490A