Image processing method, device, electronic device and storage medium

By dividing the image into pixel blocks and filling color block areas, a simple color block image is generated, which solves the problem that existing technology cannot meet the user's personalized needs, and achieves personalized style setting and visual effect improvement of the image.

CN113808120BActive Publication Date: 2024-09-20VIVO MOBILE COMM CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202111123949.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-24
Publication Date
2024-09-20
Estimated Expiration
2041-09-24

AI Technical Summary

Technical Problem

Existing image processing methods cannot meet the individual needs of users, and cannot effectively meet the individual needs of users for diversified and rich-color image display.

Method used

By dividing the image based on the preset size, calculating the RGB value and color parameters of the pixel block, dividing the color block area, and determining the fill color according to the preset color category, brightness, and saturation, a simple color block image is generated to realize the personalization of the image. Style settings.

Benefits of technology

It realizes the personalized style setting of images, giving users a minimalist style visual effect with simple colors and eye-catching colors, which meets the personalized needs of users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113808120B
    Figure CN113808120B
Patent Text Reader

Abstract

The present application discloses an image processing method, device, electronic device and storage medium, belonging to the field of image processing. The method comprises: obtaining a pixel block image corresponding to the first image based on a first image divided according to a preset size and the RGB value of each pixel point in the first image, wherein the pixel block image comprises M pixel block sub-images, where M is a positive integer; dividing the pixel block image into K color block areas based on the first color parameter of each pixel block sub-image, wherein the first color parameter comprises hue and brightness, wherein K is a positive integer, and K≤M; determining the filling color of each color block area from the N filling colors corresponding to the pixel block image based on the RGB mean value of the color block area, obtaining a second image, wherein the filling color is used to fill the corresponding color block area, wherein the N filling colors corresponding to the pixel block image are determined based on the preset color category, the RGB value of each pixel block sub-image and the second color parameter, wherein the second color parameter comprises brightness and saturation, and wherein N is a positive integer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of image processing, and specifically relates to an image processing method, device, electronic device and storage medium. Background Art

[0002] With the development of image processing technology and users' pursuit of image viewing experience, the elements displayed by images are becoming more diverse and the colors are becoming richer.

[0003] However, due to differences in user aesthetics, users have an increasing demand for personalized images, and existing image processing methods still cannot meet users' personalized needs. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide an image processing method, device, electronic device and storage medium, which can solve the problem that existing image processing methods cannot meet the personalized needs of users.

[0005] In a first aspect, an embodiment of the present application provides an image processing method, the method comprising:

[0006] Based on the first image divided according to a preset size and the RGB value of each pixel in the first image, a pixel block image corresponding to the first image is obtained, wherein the pixel block image includes M pixel block sub-images, where M is a positive integer;

[0007] Based on the first color parameter of each of the pixel block sub-images, the pixel block image is divided into K color block areas, wherein the first color parameter includes hue and lightness, K is a positive integer, K≤M;

[0008] Based on the RGB mean value of the color block area, a filling color of each color block area is determined from N filling colors corresponding to the pixel block image to obtain a second image, wherein the filling color is used to fill the corresponding color block area, and the N filling colors corresponding to the pixel block image are determined based on a preset color category, the RGB value of each of the pixel block sub-images and a second color parameter, wherein the second color parameter includes brightness and saturation, and N is a positive integer.

[0009] In a second aspect, an embodiment of the present application provides an image processing device, the device comprising:

[0010] A first division unit, configured to obtain a pixel block image corresponding to the first image based on the first image divided according to a preset size and the RGB value of each pixel point in the first image, wherein the pixel block image includes M pixel block sub-images, where M is a positive integer;

[0011] A second division unit is used to divide the pixel block image into K color block areas based on a first color parameter of each of the pixel block sub-images, wherein the first color parameter includes hue and lightness, K is a positive integer, and K≤M;

[0012] A coloring unit is used to determine a filling color of each color block area from N filling colors corresponding to the pixel block image based on the RGB mean value of the color block area to obtain a second image, wherein the filling color is used to fill the corresponding color block area, and the N filling colors corresponding to the pixel block image are determined based on a preset color category, the RGB value of each of the pixel block sub-images and a second color parameter, wherein the second color parameter includes brightness and saturation, and N is a positive integer.

[0013] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

[0014] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0015] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0016] In the embodiment of the present application, based on the RGB value of each pixel point in the first image, the first image is divided into a plurality of pixel block sub-images to obtain a pixel block image corresponding to the first image, and based on the degree of difference in brightness or hue between each pixel block sub-image in the pixel block image, the pixel block image is divided into a plurality of color block areas, and based on the RGB value of each pixel block sub-image in the pixel block image and a preset color category, a plurality of pixel block sub-image sets belonging to the same color category are determined, thereby determining a few color categories with a large distribution range in the pixel block image, and then determining a fill color for color filling of each color block area according to the brightness and saturation of each pixel block sub-image corresponding to each color category, so as to generate a second image by using these few fill colors that can represent the main color tone and color distribution of the first image. At this time, the second image is composed of only a few pure color blocks, which can give the user a simple and eye-catching minimalist style visual effect, so that the user can set a personalized style for the image to meet the personalized needs of the user. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1is a flowchart of an image processing method provided in an embodiment of the present application;

[0018] Figure 2 is a schematic diagram of a second image generated by the image processing method provided in an embodiment of the present application;

[0019] Figure 3 is a schematic diagram of dividing color block areas provided in an embodiment of the present application;

[0020] Figure 4 It is a display schematic diagram of the theme color logo provided in the embodiment of the present application;

[0021] Figure 5 is a structural schematic diagram of an image processing device provided in an embodiment of the present application;

[0022] Figure 6 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0023] Figure 7 A schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0025] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0026] The image processing method, device, electronic device and storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

[0027] The image processing method, device, electronic device and storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

[0028] Figure 1 is a flow chart of the image processing method provided in the embodiment of the present application, such as Figure 1 As shown, including:

[0029] Step 101, based on a first image divided according to a preset size and the RGB value of each pixel in the first image, a pixel block image corresponding to the first image is obtained, wherein the pixel block image includes M pixel block sub-images, where M is a positive integer;

[0030] Specifically, the first image described in the embodiment of the present application may be an image stored internally in the electronic device, or an image received externally by the electronic device, which may include color images, grayscale images, and black and white images. Specifically, it may be an image in a system theme stored in the electronic device or an image obtained by photography, and the present application does not make any specific limitations on it.

[0031] The preset size described in the embodiment of the present application may be a preset limited size. The first image divided according to the preset size is composed of M first sub-images of the preset size, where M is a positive integer.

[0032] In the embodiment of the present application, the electronic device can be any terminal device that supports image display, such as a mobile phone, a touch-screen computer, a handheld computer, a vehicle-mounted terminal, a wearable device, a PAD (Portable Android Device, tablet computer) and other devices, and the embodiment of the present application is not specifically limited here.

[0033] The pixel block sub-image described in the embodiment of the present application is obtained by calculating the average value of the RGB values ​​of the pixels in each first sub-image in the first image, and adjusting all the pixels in each first sub-image to the average value.

[0034] The pixel block image described in the embodiment of the present application refers to an image composed of pixel block sub-images after M first sub-images in the first image are processed into pixel block sub-images, wherein the pixel block image includes M pixel block sub-images.

[0035] Step 102, dividing the pixel block image into K color block areas based on the first color parameter of each pixel block sub-image, wherein the first color parameter includes hue and lightness, K is a positive integer, K≤M;

[0036] Specifically, the first color parameter described in the embodiment of the present application includes hue and brightness, which are used to determine the color difference between each pixel block sub-image in the pixel block image to perform color block area division.

[0037] It should be noted that, in order to ensure the appearance of the color block image finally generated, in the embodiment of the present application, the divided color block area contains at least two pixel block sub-images.

[0038] In the embodiment of the present application, since the user can intuitively feel the difference between different colors through hue and brightness, it is possible to select the pixel block sub-image area in which the hue or brightness in the pixel block image is significantly changed according to the hue or brightness of each pixel block sub-image in the pixel block image, that is, the hue or brightness of adjacent pixel block sub-images in the pixel block sub-image area is significantly different, and the color categories corresponding to adjacent pixel block sub-images are significantly different, and then the pixel block sub-image area with hue or brightness differences in various places in the pixel block image is divided, so that K color block areas can be obtained. Exemplarily, K can be 5, 7, 10, etc., which is specifically determined according to the color distribution in the actual first image, and the present application does not specifically limit it here.

[0039] The color block area described in the embodiment of the present application refers to an area determined by dividing the pixel block image into color blocks based on the first color parameters between the pixel block sub-images.

[0040] Step 103, based on the RGB mean value of the color block area, determine the filling color of each of the color block areas from the N filling colors corresponding to the pixel block image to obtain a second image, wherein the filling color is used to fill the corresponding color block area, and the N filling colors corresponding to the pixel block image are determined based on a preset color category, the RGB value of each of the pixel block sub-images and a second color parameter, wherein the second color parameter includes brightness and saturation, and N is a positive integer.

[0041] Specifically, in the embodiment of the present application, the colors of the pixel block sub-images in the color block area are similar, but there are also slight differences. In order to determine the main color tone of the color block area, it can be determined by calculating the average value of the RGB values ​​of the pixel block sub-images in the color block area.

[0042] The RGB mean value of the color block area described in the embodiment of the present application is obtained by calculating the average value of the RGB values ​​of each pixel block sub-image in the color block area.

[0043] The preset color categories described in the embodiments of the present application refer to color categories pre-set in the present application. For example, the preset color categories can be 10 types of colors: red, orange, yellow, green, cyan, blue, purple, black, white, and gray. Each color type has a corresponding RGB value area. The color category corresponding to each pixel block sub-image can be determined through the RGB value interval corresponding to each color category and the RGB value of each pixel block sub-image.

[0044] The filling color described in the embodiment of the present application refers to the color used to fill each color block area.

[0045] The second image described in the embodiment of the present application refers to a color block image after dividing the pixel block image into color block areas and filling each color block area with color.

[0046] The second color parameter described in the embodiment of the present application includes brightness or saturation, which is used to perform color expansion on the color of a pixel block sub-image with a main color characteristic selected from a pixel block image to generate a filling color.

[0047] The N filling colors corresponding to the pixel block image described in the embodiment of the present application refer to colors that can represent the main color tone and color distribution of the pixel block image, which are determined based on the preset color category, the RGB value of each pixel block sub-image and the second color parameter. The specific acquisition method can be to determine the pixel block sub-image corresponding to each preset color category in the pixel block image through the RGB value of each pixel block sub-image in the image and the RGB value corresponding to the preset color category, so as to select the color category that can represent the main color tone and color distribution of the first image, and adjust the brightness or saturation of the pixel block sub-images corresponding to these color categories, so as to obtain the N filling colors corresponding to the pixel block image, where N is a positive integer. For example, N can be 4, 6, 12, etc., which is specifically determined according to the actual calculation requirements, and the present application does not make specific limitations on it.

[0048] Furthermore, according to the RGB mean value of the color block area and the RGB value of each filling color, a filling color used to fill each color block area can be determined from the N filling colors corresponding to the pixel block image.

[0049] In the embodiment of the present application, after the filling colors of each color block area are determined, each filling color is filled into the corresponding color block area, thereby obtaining a color block image, that is, the second image. The second image has a simple color block style and can meet the personalized needs of users.

[0050] Figure 2 is a schematic diagram of a second image generated by the image processing method provided in an embodiment of the present application. For example, Figure 2 As shown, the second image is a color block image, including three color block areas, and the colors in each color block area are different, namely blue, orange and red.

[0051] In the embodiment of the present application, based on the RGB value of each pixel point in the first image, the first image is divided into a plurality of pixel block sub-images to obtain a pixel block image corresponding to the first image, and based on the degree of difference in brightness or hue between each pixel block sub-image in the pixel block image, the pixel block image is divided into a plurality of color block areas, and based on the RGB value of each pixel block sub-image in the pixel block image and a preset color category, a plurality of pixel block sub-image sets belonging to the same color category are determined, thereby determining a few color categories with a large distribution range in the pixel block image, and then determining a fill color for color filling of each color block area according to the brightness and saturation of each pixel block sub-image corresponding to each color category, so as to generate a second image by using these few fill colors that can represent the main color tone and color distribution of the first image. At this time, the second image is composed of only a few pure color blocks, which can give the user a simple and eye-catching minimalist style visual effect, so that the user can set a personalized style for the image to meet the personalized needs of the user.

[0052] Optionally, before determining the filling color of each color block area from the N filling colors corresponding to the pixel block image, the method further includes:

[0053] Determine a pixel block sub-image set corresponding to each preset color category based on the RGB value of each pixel block sub-image and the RGB value interval corresponding to each preset color category, wherein each pixel block sub-image set includes one or more pixel block sub-images;

[0054] Based on the number of pixel block sub-images in each of the pixel block sub-image sets, determining L target pixel block sub-image sets in each of the pixel block sub-image sets, where L is a positive integer;

[0055] Determine a target pixel block sub-image in the target pixel block sub-image set based on a second color parameter of each pixel block sub-image in the target pixel block sub-image set;

[0056] Based on each of the target pixel block sub-images, N filling colors corresponding to the pixel block image are generated.

[0057] Specifically, in an embodiment of the present application, by comparing the RGB values ​​of each pixel block sub-image with the RGB value intervals corresponding to each preset color category, each pixel block sub-image in the pixel block image is color-classified, and the preset color category corresponding to each pixel block sub-image is determined, so as to subsequently determine a pixel block sub-image that can represent the main color tone and color distribution of the first image.

[0058] The pixel block sub-image set described in the embodiment of the present application refers to a set of pixel block sub-images belonging to the same color category, which may include one or more pixel block sub-images.

[0059] The target pixel block sub-image set described in the embodiment of the present application refers to L pixel block sub-image sets selected from each pixel block sub-image set, wherein the color category corresponding to the target pixel block sub-image set can represent the main color tone and color distribution of the first image, and L is a positive integer. Exemplarily, L can be 4, 5, 7, etc., which is specifically determined according to actual calculations, and the present application does not make specific limitations on it.

[0060] In the embodiment of the present application, by determining the number of each pixel block sub-image in the pixel block sub-image set, the distribution range of the preset color category corresponding to each pixel block sub-image set in the pixel block image can be determined. For example, the number of pixel block sub-images in the pixel block sub-image set corresponding to the color category red is the largest, indicating that the color distribution range of red in the pixel block image is the largest; the number of pixel block sub-images in the pixel block sub-image set corresponding to the color category yellow is the smallest, indicating that the color distribution range of yellow in the pixel block image is the smallest.

[0061] Furthermore, based on the number of pixel block sub-images in each pixel block sub-image set, the sets are sorted from most to least, and the first few pixel block sub-image sets with a larger number of pixel block sub-images are screened out, thereby determining a plurality of pixel block sub-image sets that can represent the main color tone and color distribution of the first image, and obtaining each target pixel block sub-image set.

[0062] The target pixel block sub-image described in the embodiment of the present application refers to a color determined based on the second color parameters, namely, brightness and saturation, of each pixel block sub-image in the target pixel block sub-image set, and can represent a color with the most balanced color parameters in the same preset color category.

[0063] Optionally, in an embodiment of the present application, the target pixel block sub-image set is obtained by sorting the brightness and saturation of each pixel block sub-image, for example, sorting the colors of each pixel block sub-image from dark to light and from gray to pure, and then selecting the pixel block sub-image at the center position from the sorted pixel block sub-images, and taking the pixel block sub-image at the center position as the target pixel block sub-image. It can be understood that, in the L pixel block sub-image set, L target pixel block sub-images can be determined.

[0064] In an embodiment of the present application, in order to make the color vividness of the final generated filling color more balanced and ensure color purity, after selecting the pixel block sub-image at the above-mentioned center position, saturation preprocessing can be performed on the pixel block sub-image to control the color saturation of the pixel block sub-image to be within a fixed preset saturation range, so as to obtain the target pixel block sub-image.

[0065] Optionally, a preset saturation interval can be selected as (10-50). If the saturation of the color of the selected central position pixel block sub-image exceeds the preset saturation interval, that is, when the saturation of the color of the pixel block sub-image is less than the interval threshold 10, the saturation of the color of the pixel block sub-image is adjusted to 10, and the adjusted pixel block sub-image is used as the target pixel block sub-image; when the saturation of the color of the pixel block sub-image is greater than the interval threshold 50, the saturation of the color of the pixel block sub-image is adjusted to 50, and the adjusted pixel block sub-image is used as the target pixel block sub-image.

[0066] Furthermore, after obtaining each target pixel block sub-image, the brightness or saturation of each target pixel block sub-image may be adjusted based on each target pixel block sub-image, so as to expand each target pixel block sub-image into N colors.

[0067] Optionally, the brightness of each target pixel block sub-image may be increased by 10 or decreased by 10, and the color of the target pixel block sub-image may be expanded to 3 colors. Thus, the L colors corresponding to the L target pixel block sub-images may obtain 3L colors through the above brightness adjustment, and the 3L colors are used as the final filling colors. In this case, N=3L. Similarly, the saturation of each target pixel block sub-image may be increased by 10 or decreased by 10, and the saturation of each target pixel block sub-image may be increased by 20 or decreased by 20, and the color of the target pixel block sub-image may be expanded to 5 colors. Thus, the L colors corresponding to the L target pixel block sub-images may obtain 5L colors through the above saturation adjustment, and the 5L colors are used as the final filling colors. In this case, N=5L.

[0068] In the embodiment of the present application, the color of each pixel block sub-image is classified based on the RGB value of each pixel block sub-image and the RGB value interval corresponding to each preset color category, and a pixel block sub-image set corresponding to each preset color category is obtained to determine a plurality of pixel block sub-image sets with a larger color distribution range in the pixel block image, and then determine a target pixel block sub-image that can represent the main color tone and color distribution of the first image from these pixel block sub-image sets, so as to generate a plurality of filling colors corresponding to the pixel block image based on the target pixel block sub-image, so that each filling color can still maintain the main color tone and color distribution of the pixel block image.

[0069] Optionally, dividing the pixel block image into K color block areas based on the first color parameter of each of the pixel block sub-images includes:

[0070] Determining a color block dividing line in the pixel block image based on a first color parameter of each of the pixel block sub-images in the pixel block image;

[0071] According to the color block dividing lines, the pixel block image is divided into K color block areas.

[0072] Specifically, in the embodiment of the present application, combined with the regionalized characteristics of color distribution displayed by the image, each color distribution area in the pixel block image can be identified based on the first color parameter, i.e., hue or brightness, of each pixel block sub-image in the pixel block image, and each color block dividing line in the pixel block image can be determined, wherein the color block dividing line can be one or more.

[0073] The color block dividing lines described in the embodiments of the present application are generated based on the hue or brightness of each pixel block sub-image in the pixel block image, and the color block dividing lines are generated between pixel block sub-images whose hue or brightness changes continuously and obviously in the pixel block image.

[0074] Figure 3 is a schematic diagram of dividing color block areas provided in an embodiment of the present application, such as Figure 3 As shown, the pixel block image is divided according to the hue or brightness of each pixel block sub-image in the pixel block image to obtain three color block areas.

[0075] In the embodiment of the present application, by determining the color block dividing line in the pixel block image, the pixel block sub-image areas with obvious brightness or hue differences in the pixel block image are divided to obtain K color block areas.

[0076] Optionally, a point at any vertex in the pixel block image is selected as the origin, an XY axis plane coordinate system is established, and the pixel block sub-image where the origin is located is taken as the starting point, first along the X axis direction and then from the origin along the Y axis direction, the hue or brightness of each pixel block sub-image is identified one by one, and a pixel block sub-image area with similar hue or brightness is determined, and when a pixel block sub-image area adjacent to the pixel block sub-image area has a continuous and obvious hue or brightness difference, for example, the adjacent pixel block sub-image areas belong to different preset color categories, a color block dividing line between the adjacent pixel block sub-image areas is determined, thereby determining the color block dividing line between each adjacent pixel block sub-image area with obvious differences in the pixel block image, and finally obtaining K color block areas by division, wherein the size of each color block area must exceed 2 pixel blocks.

[0077] Optionally, any pixel block sub-image at the center of the pixel block image is selected as the starting point, and the pixel block sub-image is used as the center of the circle to perform diffusion identification of the hue or brightness between the pixel block sub-images around the pixel block sub-image, and a pixel block sub-image area with similar hue or brightness is determined. When a pixel block sub-image area adjacent to the pixel block sub-image area has a continuous and obvious hue or brightness difference, a color block dividing line between the adjacent pixel block sub-image areas is determined, thereby determining the color block dividing lines between each adjacent pixel block sub-image area with obvious differences in the pixel block image, and finally obtaining K color block areas by dividing.

[0078] In the embodiment of the present application, based on the regionalized characteristics of color distribution displayed by the image, by identifying the hue or brightness of each pixel block sub-image in the pixel block image, each color distribution area in the pixel block image is identified, and the color block dividing line in the pixel block image is determined. Then, according to each color block dividing line, the pixel block image is divided into multiple color block areas to determine the main color distribution in the first image, which is conducive to maintaining the original color tone style of the first image after the subsequent color block area is filled with color.

[0079] Optionally, determining the filling color of each color block area from N filling colors corresponding to the pixel block image based on the RGB mean value of the color block area includes:

[0080] Based on the difference between the RGB mean value of each color block area and the RGB value of each filling color, the filling color corresponding to each color block area is determined.

[0081] Specifically, in the embodiment of the present application, after the pixel block is divided into the color block area and the filling color, it is necessary to determine the filling color corresponding to each color block area so as to refill each color block area. In order to keep the main color tone of each color block area unchanged, this can be achieved by calculating the average RGB value of all pixels in each color block area and obtaining the RGB mean value of each color block area.

[0082] Furthermore, the difference between the RGB mean of each color block area and the RGB value of each filling color can be calculated to determine the filling color corresponding to the minimum difference, that is, the filling color is closest to the main color tone of the color block area, so that the filling color is used as the color to fill the color block area. In this way, the filling color corresponding to each color block area can be determined.

[0083] Optionally, when filling each color block area with color, the filling color corresponding to the target pixel block sub-image among the filling colors close to the color of the color block area may be preferentially filled.

[0084] Optionally, when filling a color block area with color, first identify the preset color category to which each pixel block sub-image in the color block area belongs, and compare it with all other color block areas belonging to the same preset color category based on the preset color category. If the color block area has a lower color brightness, select a similar and darker filling color from each filling color to fill it. If the color block area has a higher color brightness, select a similar and brighter filling color from each filling color to fill it.

[0085] In an embodiment of the present application, by calculating the difference between the RGB mean value of each color block area and the RGB value of each filling color, the filling color closest to the main color tone of each color block area is determined from each filling color, so that the filling color corresponding to each color block area can be determined, so that the original color tone style of the first image is still maintained after the color block area is filled with color.

[0086] Optionally, obtaining a pixel block image corresponding to the first image based on the first image divided according to a preset size and the RGB value of each pixel in the first image includes:

[0087] Determine M first sub-images based on the first image divided according to a preset size;

[0088] Obtaining a pixel block sub-image corresponding to the first sub-image based on the RGB mean value of the first sub-image;

[0089] A pixel block image corresponding to the first image is obtained based on the pixel block sub-images corresponding to the first sub-images.

[0090] Specifically, in an embodiment of the present application, after dividing the first image according to a preset size, M first sub-images can be obtained, where M is a positive integer, and M represents the number of first sub-images obtained after dividing the first image according to the preset size. M can take a value of 20, 40, 50, etc., which is determined according to actual computing requirements, and the present application does not make any specific limitation on it.

[0091] Optionally, in units of pixels, the image size of the first image is 300×500, that is, the length of the first image is 300 pixels and the width is 500 pixels. Then, a preset size of 15×25, that is, a preset size of 15 pixels in length and 25 pixels in width, can be selected to divide the first image to obtain 20 first sub-images; or a preset size of 6×10, that is, a preset size of 6 pixels in length and 10 pixels in width, can be selected to divide the first image to obtain 50 first sub-images.

[0092] The RGB mean value of the first sub-image described in the embodiment of the present application is obtained by calculating the average value of the RGB values ​​of each pixel in the first sub-image.

[0093] By using the RGB mean value of the first sub-image, each pixel point in the first sub-image is adjusted to the same average value, so as to obtain a pixel block sub-image corresponding to the first sub-image.

[0094] Furthermore, after obtaining the pixel block sub-images corresponding to the respective first sub-images, the pixel block image corresponding to the first image can be obtained.

[0095] In an embodiment of the present application, a plurality of first sub-images are obtained by dividing the first image according to a preset size, and each of the first sub-images is pixelated based on the calculation of the RGB mean of the first sub-image, thereby obtaining a pixel block image corresponding to the first image. The generated pixel block image can still thermally retain the main color tone and color distribution of the first image.

[0096] Optionally, after determining the filling color of each of the color block areas from the N filling colors corresponding to the pixel block image to obtain the second image, the method further includes:

[0097] receiving a first input from a user;

[0098] In response to the first input, T theme color identifiers are displayed, wherein each theme color identifier corresponds to a theme color scheme, and the theme color scheme is generated based on the filling color of each color block area in the second image, wherein T is a positive integer;

[0099] receiving a second input from a user regarding a target theme color identifier among the T theme color identifiers;

[0100] In response to the second input, the color attribute of the system control identifier in the system interface is adjusted according to the theme color scheme corresponding to the target theme color identifier.

[0101] Specifically, the system control identifier described in the embodiment of the present application can be an image identifier of a system component, system module, desktop component, application, lock screen, etc. in an electronic device system, wherein the system components include check boxes, single selections, box selections, progress bars, volume bars, prompt points, buttons, indexes, text box selections, and other electronic device system controls; the system modules include setting interfaces of application programs such as a control center, notification center, system settings, alarm clocks, calculators, compasses, and recorders; the system application program can be an application program that comes with the electronic device, or an application program that the electronic device downloads and installs from the outside.

[0102] The theme color scheme described in the embodiment of the present application refers to a scheme for adjusting the color parameters of the system controls in the system interface, which can specifically be a color scheme determined according to the fill color of each color block area in the second image. Optionally, the fill colors of each color block area in the second image can be five colors: red, yellow, blue, green, and purple. Multiple combinations of three colors can be selected based on these five colors, such as red, yellow, and blue as a group combination, yellow, blue, and green as a group combination, and yellow, blue, and purple as a group combination. Thus, three theme color schemes can be determined, namely, a theme color scheme with red, yellow, and blue as the theme colors, a theme color scheme with yellow, blue, and green as the theme colors, and a theme color scheme with yellow, blue, and purple as the theme colors.

[0103] The first input described in the embodiment of the present application refers to an operation for generating a theme color scheme based on the fill colors of each color block area in the second image. The first input may be an input of a user's operation on the second image, which may specifically be a single-click operation, a double-click operation, or a long-press operation, etc.

[0104] The theme color identifier described in the embodiment of the present application refers to a theme color image identifier corresponding to a theme color scheme, and each theme color identifier corresponds to a theme color scheme.

[0105] Optionally, the filling colors of each color block area in the second image can be six colors: red, yellow, blue, green, purple and white. Four combinations of three colors can be selected based on these six colors, such as red, yellow and white as a combination, yellow, green and white as a combination, blue, purple and white as a combination, and red, blue and white as a combination. Thus, four theme color schemes can be determined, namely, a theme color scheme with red, yellow and white as the theme colors, a theme color scheme with yellow, green and white as the theme colors, a theme color scheme with blue, purple and white as the theme colors, and a theme color scheme with red, blue and white as the theme colors. Thus, according to the four theme color schemes, there can be corresponding four theme color logos.

[0106] Furthermore, after receiving the first input from the user, the electronic device will display T theme color logos in response to the first input, where T is a positive integer.

[0107] Figure 4 is a display schematic diagram of the theme color logo provided in the embodiment of the present application, such as Figure 4As shown, there are 6 theme color logos, namely the first theme color logo 41, which corresponds to the theme color scheme with red, orange and white as the theme colors; the second theme color logo 42, which corresponds to the theme color scheme with orange, green and white as the theme colors; the third theme color logo 43, which corresponds to the theme color scheme with blue, purple and white as the theme colors; the fourth theme color logo 44, which corresponds to the theme color scheme with red, blue and white as the theme colors; the fifth theme color logo 45, which corresponds to the theme color scheme with orange, blue and white as the theme colors; the sixth theme color logo 46, which corresponds to the theme color scheme with blue, green and white as the theme colors.

[0108] The color attributes described in the embodiment of the present application refer to the hue, saturation, and brightness of the color displayed by the system control identifier.

[0109] The target theme color identifier described in the embodiment of the present application refers to a theme color identifier selected by a user from various theme color identifiers, which is used to adjust the color properties of various system control identifiers in the system interface based on the corresponding theme color scheme.

[0110] The second input described in the embodiment of the present application refers to an operation for selecting a target theme color logo from T theme color logos. The second input may be an input of a user's operation on the target theme color logo, which may specifically be a single-click operation, a double-click operation, or a long-press operation.

[0111] Furthermore, a second input from the user is received for a target theme color identifier among T theme color identifiers, such as an operation in which the user clicks to select or long presses the target theme color identifier. In response to the second input, the electronic device will adjust the color attributes of each system control identifier in the system interface, such as system components, system modules, desktop components, applications, or lock screens, to color attributes consistent with the theme color according to the theme color attributes in the theme color scheme corresponding to the target theme color identifier, so as to re-color the colors displayed by each system component, system module, desktop component, application, or lock screen, and other image identifiers.

[0112] In an embodiment of the present application, a blue theme color scheme and a green theme color scheme can be generated according to the fill colors of each color block area in the second image. After the user clicks the green theme color logo corresponding to the green theme color scheme, the green color scheme will be applied to each system control logo in the system interface, such as the progress bar image logo, volume bar image logo, control center image logo, progress bar image logo, display time image logo, button image logo, etc. will all be adjusted to the green color scheme.

[0113] In an embodiment of the present application, the theme color scheme generated according to the fill color of each color block area in the second image will also change the color of the system desktop application image logo and the desktop component image logo. The system reads the color of the desktop application image logo, intelligently color-partitions the color of the image logo, and fills the theme color in the theme color scheme into the color partition to generate a desktop application image logo with a new color and replace the old image logo. The theme color scheme of the desktop component image logo can change the color of the text logo in the desktop component and the color of the desktop component image logo. The desktop component will calculate the difference between its own color and the desktop background color, and select a color different from the background color to avoid the color of the desktop component image logo being integrated with the color of the desktop background and being indistinguishable.

[0114] In an embodiment of the present application, a purple theme color scheme and a yellow theme color scheme can also be generated based on the fill colors of each color block area in the second image. After the user clicks on the purple theme color logo corresponding to the purple theme color scheme, the desktop application image logo and the desktop component image logo will be adjusted to the purple color scheme.

[0115] In an embodiment of the present application, the color of the system lock screen image logo can also be changed according to the theme color scheme generated by the fill color of each color block area in the second image, so that each image logo in the system lock screen interface is adjusted to the theme color corresponding to the theme color scheme.

[0116] In an embodiment of the present application, when the theme color scheme for the lock screen image logo is the same as the theme color scheme for the desktop image logo, the color of the lock screen image logo after color adjustment is the same as the color of the desktop image logo after color adjustment; when the color scheme for the lock screen image logo is different from the color scheme for the desktop image logo, the color of the lock screen image logo after color adjustment is different from the color of the desktop image logo after color adjustment. The system can use colors from the two theme color schemes corresponding to the lock screen image logo and the desktop image logo to match the color of the lock screen image logo, such as applying the yellow theme color scheme corresponding to the lock screen image logo and the blue theme color scheme corresponding to the desktop image logo to the lock screen interface, so that the lock screen image logo in the interface contains both yellow-colored image logos and blue-colored image logos.

[0117] In an embodiment of the present application, multiple theme color schemes are generated based on the fill colors of each color block area in the second image, so that users can select theme color schemes according to personal needs, thereby realizing customized setting and adjustment of the colors of system control logos in electronic devices. The colors of system control logos can change with different theme color schemes, meeting the personalized needs of users.

[0118] In an embodiment of the present application, for pure color images, such as pure gray, pure white, pure black, pure green, etc., a preset color block area division method can be used for area division and coloring. The pure color image can be divided into 3, 4 or more color block areas, and then the pure color is used as a reference to generate a corresponding number of gradient colors to fill the divided color block areas and generate a color block image.

[0119] Optionally, a preset color block area division method can be used for the pure gray image to divide three color block areas, and then the three color block areas are filled with three grays with different RGB values, so that the pure gray image does not present a monotonous solid color, but can present a minimalist color block pattern.

[0120] It should be noted that the image processing method provided in the embodiment of the present application can be executed by an image processing device or a control module in the image processing device for executing the image processing method. In the embodiment of the present application, the image processing device provided in the embodiment of the present application is described by taking the method for executing image processing by an image processing device as an example.

[0121] Figure 5 is a schematic diagram of the structure of an image processing device provided in an embodiment of the present application, such as Figure 5 As shown, including:

[0122] A first division unit 510 is configured to obtain a pixel block image corresponding to the first image based on the first image divided according to a preset size and the RGB value of each pixel point in the first image, wherein the pixel block image includes M pixel block sub-images, where M is a positive integer;

[0123] A second division unit 520 is used to divide the pixel block image into K color block areas based on the first color parameter of each pixel block sub-image, wherein the first color parameter includes hue and lightness, K is a positive integer, K≤M;

[0124] The coloring unit 530 is used to determine the filling color of each color block area from N filling colors corresponding to the pixel block image based on the RGB mean value of the color block area, so as to obtain a second image, wherein the filling color is used to fill the corresponding color block area, and the N filling colors corresponding to the pixel block image are determined based on a preset color category, the RGB value of each of the pixel block sub-images and a second color parameter, wherein the second color parameter includes brightness and saturation, and N is a positive integer.

[0125] Optionally, the device further comprises:

[0126] A first determining unit, configured to determine a pixel block sub-image set corresponding to each preset color category based on the RGB value of each pixel block sub-image and the RGB value interval corresponding to each preset color category, wherein each pixel block sub-image set includes one or more pixel block sub-images;

[0127] A second determining unit, configured to determine L target pixel block sub-image sets in each of the pixel block sub-image sets based on the number of pixel block sub-images in each of the pixel block sub-image sets, where L is a positive integer;

[0128] a third determining unit, configured to determine a target pixel block sub-image in the target pixel block sub-image set based on a second color parameter of each pixel block sub-image in the target pixel block sub-image set;

[0129] A generating unit is used to generate N filling colors corresponding to the pixel block image based on each of the target pixel block sub-images.

[0130] Optionally, the second dividing unit 520 is further configured to:

[0131] Determining a color block dividing line in the pixel block image based on a first color parameter of each of the pixel block sub-images in the pixel block image;

[0132] According to the color block dividing lines, the pixel block image is divided into K color block areas.

[0133] Optionally, the coloring unit 530 is further configured to:

[0134] Based on the difference between the RGB mean value of each color block area and the RGB value of each filling color, the filling color corresponding to each color block area is determined.

[0135] Optionally, the first dividing unit 510 is further configured to:

[0136] Determine M first sub-images based on the first image divided according to a preset size;

[0137] Obtaining a pixel block sub-image corresponding to the first sub-image based on the RGB mean value of the first sub-image;

[0138] A pixel block image corresponding to the first image is obtained based on the pixel block sub-images corresponding to the first sub-images.

[0139] Optionally, the device further comprises:

[0140] A first input unit, used to receive a first input from a user;

[0141] a first response unit, configured to display T theme color identifiers in response to the first input, wherein each theme color identifier corresponds to a theme color scheme, and the theme color scheme is generated based on the filling color of each color block area in the second image, wherein T is a positive integer;

[0142] A second input unit, used to receive a second input from a user on a target theme color identifier among the T theme color identifiers;

[0143] The second response unit is used to adjust the color attribute of the system control identifier in the system interface according to the theme color scheme corresponding to the target theme color identifier in response to the second input.

[0144] In the embodiment of the present application, based on the RGB value of each pixel point in the first image, the first image is divided into a plurality of pixel block sub-images to obtain a pixel block image corresponding to the first image, and based on the degree of difference in brightness or hue between each pixel block sub-image in the pixel block image, the pixel block image is divided into a plurality of color block areas, and based on the RGB value of each pixel block sub-image in the pixel block image and a preset color category, a plurality of pixel block sub-image sets belonging to the same color category are determined, thereby determining a few color categories with a large distribution range in the pixel block image, and then determining a fill color for color filling of each color block area according to the brightness and saturation of each pixel block sub-image corresponding to each color category, so as to generate a second image by using these few fill colors that can represent the main color tone and color distribution of the first image. At this time, the second image is composed of only a few pure color blocks, which can give the user a simple and eye-catching minimalist style visual effect, so that the user can set a personalized style for the image to meet the personalized needs of the user.

[0145] The image processing device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0146] The image processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0147] The image processing device provided in the embodiment of the present application can achieve Figures 1 to 6 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0148] Optionally, Figure 6 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 6 As shown, an embodiment of the present application also provides an electronic device 600, including a processor 601, a memory 602, and a program or instruction stored in the memory 602 and executable on the processor 601. When the program or instruction is executed by the processor 601, each process of the above-mentioned image processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0149] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0150] Figure 7 A schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.

[0151] The electronic device 700 includes but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, and a processor 710.

[0152] Those skilled in the art will appreciate that the electronic device 700 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 710 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 7 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0153] The processor 710 is configured to obtain a pixel block image corresponding to the first image based on the first image divided according to a preset size and the RGB value of each pixel point in the first image, wherein the pixel block image includes M pixel block sub-images, where M is a positive integer;

[0154] The processor 710 is configured to divide the pixel block image into K color block regions based on a first color parameter of each pixel block sub-image, wherein the first color parameter includes hue and brightness, K is a positive integer, and K≤M;

[0155] The processor 710 is used to determine the filling color of each color block area from the N filling colors corresponding to the pixel block image based on the RGB mean value of the color block area, so as to obtain a second image, wherein the filling color is used to fill the corresponding color block area, and the N filling colors corresponding to the pixel block image are determined based on a preset color category, the RGB value of each of the pixel block sub-images and a second color parameter, wherein the second color parameter includes brightness and saturation, and N is a positive integer.

[0156] The processor 710 is configured to determine a pixel block sub-image set corresponding to each preset color category based on the RGB value of each pixel block sub-image and the RGB value interval corresponding to each preset color category, wherein each pixel block sub-image set includes one or more pixel block sub-images;

[0157] Based on the number of pixel block sub-images in each of the pixel block sub-image sets, determining L target pixel block sub-image sets in each of the pixel block sub-image sets, where L is a positive integer;

[0158] Determine a target pixel block sub-image in the target pixel block sub-image set based on a second color parameter of each pixel block sub-image in the target pixel block sub-image set;

[0159] Based on each of the target pixel block sub-images, N filling colors corresponding to the pixel block image are generated.

[0160] The processor 710 is configured to determine a color block dividing line in the pixel block image based on a first color parameter of each of the pixel block sub-images in the pixel block image;

[0161] According to the color block dividing lines, the pixel block image is divided into K color block areas.

[0162] The processor 710 is used to determine the filling color corresponding to each of the color block areas based on the difference between the RGB mean value of each of the color block areas and the RGB value of each of the filling colors.

[0163] The processor 710 is configured to determine M first sub-images based on the first image divided according to a preset size;

[0164] Obtaining a pixel block sub-image corresponding to the first sub-image based on the RGB mean value of the first sub-image;

[0165] A pixel block image corresponding to the first image is obtained based on the pixel block sub-images corresponding to the first sub-images.

[0166] The user input unit 707 is used to receive a first input from a user;

[0167] The display unit 706 is used to display T theme color identifiers in response to the first input, wherein each theme color identifier corresponds to a theme color scheme, and the theme color scheme is generated based on the filling color of each color block area in the second image, wherein T is a positive integer;

[0168] The user input unit 707 is also used to receive a second input from the user on a target theme color identifier among the T theme color identifiers;

[0169] The processor 710 is used to adjust the color attribute of the system control identifier in the system interface according to the theme color scheme corresponding to the target theme color identifier in response to the second input.

[0170] In the embodiment of the present application, based on the RGB value of each pixel point in the first image, the first image is divided into a plurality of pixel block sub-images to obtain a pixel block image corresponding to the first image, and based on the degree of difference in brightness or hue between each pixel block sub-image in the pixel block image, the pixel block image is divided into a plurality of color block areas, and based on the RGB value of each pixel block sub-image in the pixel block image and a preset color category, a plurality of pixel block sub-image sets belonging to the same color category are determined, thereby determining a few color categories with a large distribution range in the pixel block image, and then determining a fill color for color filling of each color block area according to the brightness and saturation of each pixel block sub-image corresponding to each color category, so as to generate a second image by using these few fill colors that can represent the main color tone and color distribution of the first image. At this time, the second image is composed of only a few pure color blocks, which can give the user a simple and eye-catching minimalist style visual effect, so that the user can set a personalized style for the image to meet the personalized needs of the user.

[0171] It should be understood that in the embodiment of the present application, the input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 7041 and a microphone 7042, and the graphics processor 7041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 707 includes a touch panel 7071 and other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 may include two parts: a touch detection device and a touch controller. Other input devices 7072 may include but are not limited to a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 709 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 710 can integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and applications, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 710.

[0172] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned image processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0173] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0174] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned image processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0175] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0176] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0177] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0178] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. An image processing method, characterized in that: include: Based on the first image divided according to a preset size and the RGB value of each pixel in the first image, a pixel block image corresponding to the first image is obtained, wherein the pixel block image includes M pixel block sub-images, where M is a positive integer; Based on the first color parameter of each of the pixel block sub-images, the pixel block image is divided into K color block areas, wherein the first color parameter includes hue and lightness, K is a positive integer, K≤M; Based on the RGB mean value of the color block area, determine the filling color of each color block area from N filling colors corresponding to the pixel block image to obtain a second image, wherein the filling color is used to fill the corresponding color block area, and the N filling colors corresponding to the pixel block image are determined based on a preset color category, the RGB value of each pixel block sub-image and a second color parameter, wherein the second color parameter includes lightness and saturation, and N is a positive integer; Wherein, before determining the filling color of each color block area from the N filling colors corresponding to the pixel block image, the method further includes: Determine a pixel block sub-image set corresponding to each preset color category based on the RGB value of each pixel block sub-image and the RGB value interval corresponding to each preset color category, wherein each pixel block sub-image set includes one or more pixel block sub-images; Based on the number of pixel block sub-images in each of the pixel block sub-image sets, determining L target pixel block sub-image sets in each of the pixel block sub-image sets, where L is a positive integer; Determine a target pixel block sub-image in the target pixel block sub-image set based on a second color parameter of each pixel block sub-image in the target pixel block sub-image set; Based on each of the target pixel block sub-images, N filling colors corresponding to the pixel block image are generated.

2. The image processing method according to claim 1, characterized in that: The step of dividing the pixel block image into K color block areas based on the first color parameters of each pixel block sub-image comprises: Determining a color block dividing line in the pixel block image based on a first color parameter of each of the pixel block sub-images in the pixel block image; According to the color block dividing lines, the pixel block image is divided into K color block areas.

3. The image processing method according to claim 1, characterized in that: The step of determining the filling color of each color block area from N filling colors corresponding to the pixel block image based on the RGB mean value of the color block area includes: Based on the difference between the RGB mean value of each color block area and the RGB value of each filling color, the filling color corresponding to each color block area is determined.

4. The image processing method according to claim 1, characterized in that: The step of obtaining a pixel block image corresponding to the first image based on the first image divided according to a preset size and the RGB value of each pixel in the first image includes: Determine M first sub-images based on the first image divided according to a preset size; Obtaining a pixel block sub-image corresponding to the first sub-image based on the RGB mean value of the first sub-image; A pixel block image corresponding to the first image is obtained based on the pixel block sub-images corresponding to the first sub-images.

5. The image processing method according to claim 1, characterized in that: After determining the filling color of each color block area from the N filling colors corresponding to the pixel block image to obtain the second image, the method further includes: receiving a first input from a user; In response to the first input, T theme color identifiers are displayed, wherein each theme color identifier corresponds to a theme color scheme, and the theme color scheme is generated based on the filling color of each color block area in the second image, wherein T is a positive integer; receiving a second input from a user regarding a target theme color identifier among the T theme color identifiers; In response to the second input, the color attribute of the system control identifier in the system interface is adjusted according to the theme color scheme corresponding to the target theme color identifier.

6. An image processing device, characterized in that: include: A first division unit, configured to obtain a pixel block image corresponding to the first image based on the first image divided according to a preset size and the RGB value of each pixel point in the first image, wherein the pixel block image includes M pixel block sub-images, where M is a positive integer; A second division unit is used to divide the pixel block image into K color block areas based on a first color parameter of each of the pixel block sub-images, wherein the first color parameter includes hue and lightness, K is a positive integer, and K≤M; a color filling unit, configured to determine a filling color of each color block area from N filling colors corresponding to the pixel block image based on the RGB mean value of the color block area, so as to obtain a second image, wherein the filling color is used to fill the corresponding color block area, and the N filling colors corresponding to the pixel block image are determined based on a preset color category, the RGB value of each of the pixel block sub-images, and a second color parameter, wherein the second color parameter includes lightness and saturation, and N is a positive integer; Wherein, the device further comprises: A first determining unit, configured to determine a pixel block sub-image set corresponding to each preset color category based on the RGB value of each pixel block sub-image and the RGB value interval corresponding to each preset color category, wherein each pixel block sub-image set includes one or more pixel block sub-images; A second determining unit, configured to determine L target pixel block sub-image sets in each of the pixel block sub-image sets based on the number of pixel block sub-images in each of the pixel block sub-image sets, where L is a positive integer; a third determining unit, configured to determine a target pixel block sub-image in the target pixel block sub-image set based on a second color parameter of each pixel block sub-image in the target pixel block sub-image set; A generating unit is used to generate N filling colors corresponding to the pixel block image based on each of the target pixel block sub-images.

7. The image processing device according to claim 6, characterized in that: The second division unit is further specifically used for: Determining a color block dividing line in the pixel block image based on a first color parameter of each of the pixel block sub-images in the pixel block image; According to the color block dividing lines, the pixel block image is divided into K color block areas.

8. The image processing device according to claim 6, characterized in that: The coloring unit is also specifically used for: Based on the difference between the RGB mean value of each color block area and the RGB value of each filling color, the filling color corresponding to each color block area is determined.

9. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the image processing method according to any one of claims 1 to 5.

10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the image processing method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Automatic establishing and converting method for color models of computer input device

    CN103106670A

  • Color setting method and device and electronic device

    CN109358926A

  • Color adjustment method and device for interface assembly, equipment and medium

    CN109783178A

  • Color-merged drawing image processing method, device and equipment and storage medium

    CN111062993A

  • Image processing apparatus, control method, and program

    JP2011142471A